Organizations
Organizations are the top-level structure in AutoRetouch. They contain workflows, executions, and billing is handled at the organization level. Users can be members of multiple organizations.
List Organizations
Section titled “List Organizations”Get all organizations the authenticated user is a member of.
GET https://api.autoretouch.com/v1/organizationQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Maximum results per page |
offset | integer | 0 | Number of results to skip |
Request
Section titled “Request”curl -X GET "https://api.autoretouch.com/v1/organization?limit=50&offset=0" \ -H "Authorization: Bearer {accessToken}"import requests
response = requests.get( "https://api.autoretouch.com/v1/organization", params={"limit": 50, "offset": 0}, headers={"Authorization": f"Bearer {access_token}"})data = response.json()
for org in data["entries"]: print(f"{org['name']}: {org['id']}")Success Response (200)
Section titled “Success Response (200)”{ "entries": [ { "id": "9f5c2d7b-8b21-4a33-9e5f-4e1b7a01c9d4", "name": "My Organization", "version": "c8e4f632-2d45-4d13-99d0-a91b2334b80a", "members": [ { "id": "google-oauth2|105487236547812345678", "givenName": "John", "familyName": "Doe", "email": "john.doe@example.com", "picture": "https://example.com/profiles/john.jpg", "roles": ["admin"] }, { "id": "auth0|64b2a91f3f2c490012345678", "givenName": "Alice", "familyName": "Smith", "email": "alice.smith@example.com", "picture": "https://example.com/profiles/alice.jpg", "roles": ["operator"] } ] } ], "total": 1}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
entries | array | List of organizations |
total | integer | Total number of organizations |
Organization Object
Section titled “Organization Object”| Field | Type | Description |
|---|---|---|
id | string | Organization ID (UUID) |
name | string | Display name |
version | string | Organization version ID |
members | array | List of organization members |
Member Object
Section titled “Member Object”| Field | Type | Description |
|---|---|---|
id | string | User ID |
givenName | string | First name |
familyName | string | Last name |
email | string | Email address |
picture | string | Profile picture URL |
roles | array | User roles (admin, operator) |
Get Organization Details
Section titled “Get Organization Details”Get details for a specific organization.
GET https://api.autoretouch.com/v1/organization/{organizationId}/Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
organizationId | string | Organization ID |
Request
Section titled “Request”curl -X GET "https://api.autoretouch.com/v1/organization/{organizationId}/" \ -H "Authorization: Bearer {accessToken}"import requests
response = requests.get( f"https://api.autoretouch.com/v1/organization/{organization_id}/", headers={"Authorization": f"Bearer {access_token}"})org = response.json()
print(f"Organization: {org['name']}")print(f"Members: {len(org['members'])}")Success Response (200)
Section titled “Success Response (200)”{ "id": "9f5c2d7b-8b21-4a33-9e5f-4e1b7a01c9d4", "name": "My Organization", "version": "c8e4f632-2d45-4d13-99d0-a91b2334b80a", "members": [ { "id": "google-oauth2|105487236547812345678", "givenName": "John", "familyName": "Doe", "email": "john.doe@example.com", "picture": "https://example.com/profiles/john.jpg", "roles": ["admin"] } ]}Get Credit Balance
Section titled “Get Credit Balance”Get the current credit balance for an organization.
GET https://api.autoretouch.com/v1/organization/balanceQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
organization | string | Yes | Organization ID |
Request
Section titled “Request”curl -X GET "https://api.autoretouch.com/v1/organization/balance?organization={organizationId}" \ -H "Authorization: Bearer {accessToken}"import requests
response = requests.get( "https://api.autoretouch.com/v1/organization/balance", params={"organization": organization_id}, headers={"Authorization": f"Bearer {access_token}"})
balance = int(response.text)print(f"Credit balance: {balance}")Success Response (200)
Section titled “Success Response (200)”Returns the credit balance as a plain integer:
6820Usage Notes
Section titled “Usage Notes”- Each workflow execution costs a certain number of credits (see
executionPricein workflow details) - If the balance is insufficient, executions will have status
PAYMENT_REQUIRED - Contact your AutoRetouch representative to add credits to your organization