Skip to content

Make a Hugging Face token the default

PATCH
/v1/integrations/{integration_id}/default
curl --request PATCH \
--url https://example.com/v1/integrations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/default \
--header 'X-API-Key: <X-API-Key>'

Make a Hugging Face token the one new runs use. Workspaces on the old default move to it.

Needs integrations:write and Admin on the organization.

integration_id
required
string format: uuid

Successful Response

Media type application/json
Integration

One integration key, without its value.

object
id
required

The integration key’s ID

string format: uuid
provider
required

The service the key is for

string
Allowed value: huggingface
name
required

The key’s name

string
last4

The key’s last four characters; null for a key shorter than 12

string | null
is_default
required

The Hugging Face token new runs use

boolean
created_by
required

The person who added it

string format: uuid
created_at
required

When it was added

string format: date-time
expires_at
required

When it expires

string format: date-time
Example
{
"provider": "huggingface"
}

Invalid or missing API key

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

Missing integrations:write or Admin

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

Not found or access denied

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

Not a Hugging Face token

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}