Documentation

Account & Resource Endpoints

Endpoints for managing user accounts, checking credit balances, and team membership. Monitor usage and manage access programmatically.

Endpoint – Get user profile

GET /api/v1/user

Description

Returns basic profile information for the authenticated user (the user to which the API token belongs), including id, email, and name.

Successful response (200)

{
  "id": "user_123",
  "email": "user@example.com",
  "name": "John Doe"
}

Error responses

StatusDescription
401Unauthorized – missing or invalid credentials.
404User not found.
500Internal server error.

Code Examples

curl -X GET https://www.renamed.to/api/v1/user \
  -H "Authorization: Bearer rt_your_token_here"

Endpoint – Get credit balance

GET /api/v1/credits

Description

Returns the current credit balance for the authenticated user. Credits are consumed when renaming files via the API.

Successful response (200)

{
  "credits": 150
}

Error responses

StatusDescription
401Not authenticated – missing or invalid credentials.
404User not found.
500Internal server error.

Code Examples

curl -X GET https://www.renamed.to/api/v1/credits \
  -H "Authorization: Bearer rt_your_token_here"

Endpoint – Get team information

GET /api/v1/team

Description

Returns team information if the authenticated user is part of a team. Returns null if not part of a team.

Note: This endpoint returns null if your account is not part of a team.

Successful response (200)

{
  "id": "team_123",
  "name": "Acme Corp",
  "teamMembers": [
    {
      "user": {
        "id": "user_123",
        "name": "John Doe",
        "email": "john@example.com"
      }
    }
  ]
}

Error responses

StatusDescription
401Unauthorized – missing or invalid credentials.
500Internal server error.

Code Examples

curl -X GET https://www.renamed.to/api/v1/team \
  -H "Authorization: Bearer rt_your_token_here"