Authentication

API key management and user authentication

User Login

post
/auth/login

Authenticate user and receive JWT token

Body
usernamestring · emailRequired

User's email address

Example: [email protected]
passwordstring · passwordRequired

User's password

Example: password
Responses
chevron-right
200

Login successful

application/json
access_tokenstringRequired

JWT access token

token_typestringRequiredExample: bearer
user_idintegerRequiredExample: 3
post
/auth/login

List API Keys

get
/auth/api-keys

Get all API keys for the current user

Authorizations
AuthorizationstringRequired

API key authentication using Bearer token format. Example: Authorization: Bearer gcreg_2fCeA78CA62644eB55B0A36249245A27

Responses
chevron-right
200

List of API keys

application/json
idintegerRequiredExample: 1
key_namestringRequiredExample: Clean Incentive Marketplace Integration
key_prefixstringRequiredExample: gcreg_2f
scopesstringRequiredExample: read
rate_limitintegerRequiredExample: 1000
is_activebooleanRequiredExample: true
last_usedstring · date-time · nullableOptionalExample: 2024-01-01T14:30:00Z
expires_atstring · date-time · nullableOptional
created_atstring · date-timeRequiredExample: 2024-01-01T13:10:00Z
get
/auth/api-keys

Create API Key

post
/auth/api-keys

Create a new API key for external integrations

Authorizations
AuthorizationstringRequired

API key authentication using Bearer token format. Example: Authorization: Bearer gcreg_2fCeA78CA62644eB55B0A36249245A27

Body
key_namestringRequired

Human-readable name for the API key

Example: Clean Incentive Marketplace Integration
scopesstring · enumOptional

Comma-separated scopes

Default: readExample: readPossible values:
rate_limitintegerOptional

Hourly rate limit for this key

Default: 1000Example: 1000
expires_atstring · date-time · nullableOptional

When the key expires (optional)

Responses
post
/auth/api-keys

Delete API Key

delete
/auth/api-keys/{api_key_id}

Delete an existing API key

Authorizations
AuthorizationstringRequired

API key authentication using Bearer token format. Example: Authorization: Bearer gcreg_2fCeA78CA62644eB55B0A36249245A27

Path parameters
api_key_idintegerRequired

API key ID to delete

Example: 1
Responses
delete
/auth/api-keys/{api_key_id}

No content

Update API Key

patch
/auth/api-keys/{api_key_id}

Update an existing API key's properties

Authorizations
AuthorizationstringRequired

API key authentication using Bearer token format. Example: Authorization: Bearer gcreg_2fCeA78CA62644eB55B0A36249245A27

Path parameters
api_key_idintegerRequired

API key ID to update

Example: 1
Body
key_namestringOptionalExample: Updated Marketplace Integration
is_activebooleanOptionalExample: true
rate_limitintegerOptionalExample: 2000
expires_atstring · date-time · nullableOptional
Responses
chevron-right
200

API key updated successfully

application/json
idintegerRequiredExample: 1
key_namestringRequiredExample: Clean Incentive Marketplace Integration
key_prefixstringRequiredExample: gcreg_2f
scopesstringRequiredExample: read
rate_limitintegerRequiredExample: 1000
is_activebooleanRequiredExample: true
last_usedstring · date-time · nullableOptionalExample: 2024-01-01T14:30:00Z
expires_atstring · date-time · nullableOptional
created_atstring · date-timeRequiredExample: 2024-01-01T13:10:00Z
patch
/auth/api-keys/{api_key_id}

Last updated