API REFERENCE
Get Account ID
On this page
GET
/api/accounts/idRetrieve the ID of the authenticated account associated with the provided credentials. This is useful when you have an API key or access token but do not yet know the corresponding accountId.
Authentication
x-api-key in header
bearerAuth bearer
Request
cURL
curl --request GET \
--url 'https://api.recoupable.dev/api/accounts/id' \
--header 'x-api-key: YOUR_API_KEY'Responses
200Account ID retrieved successfully+
application/json
statusstring · enumrequiredStatus of the request
Values: "success"
accountIdstringrequiredThe unique identifier (UUID) of the authenticated account
format: uuid
401Unauthorized - missing or invalid credentials+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
messagestringrequiredError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download accounts.jsonView operation source
json
{
"description": "Retrieve the ID of the authenticated account associated with the provided credentials. This is useful when you have an API key or access token but do not yet know the corresponding accountId.",
"parameters": [],
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Account ID retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetAccountIdResponse"
}
}
}
},
"401": {
"description": "Unauthorized - missing or invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountErrorResponse"
}
}
}
}
}
}