계정 및 리소스 엔드포인트
사용자 계정 관리, 크레딧 잔액 확인 및 팀 멤버십을 위한 엔드포인트입니다. 프로그래밍 방식으로 사용량을 모니터링하고 액세스를 관리하십시오.
Endpoint – Get user profile
GET /api/v1/userDescription
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
| Status | Description |
|---|---|
| 401 | Unauthorized – missing or invalid credentials. |
| 404 | User not found. |
| 500 | Internal 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/creditsDescription
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
| Status | Description |
|---|---|
| 401 | Not authenticated – missing or invalid credentials. |
| 404 | User not found. |
| 500 | Internal 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/teamDescription
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
| Status | Description |
|---|---|
| 401 | Unauthorized – missing or invalid credentials. |
| 500 | Internal server error. |
Code Examples
curl -X GET https://www.renamed.to/api/v1/team \
-H "Authorization: Bearer rt_your_token_here"