Skip to main content
POST
/
api
/
v1
/
code-providers
Create code providers
curl --request POST \
  --url https://api.agenhq.com/api/v1/code-providers \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "platform": "<string>",
  "name": "<string>",
  "base_url": "<string>",
  "metadata": {
    "type": "<string>",
    "token": "<string>"
  }
}
'
{
  "id": "<string>",
  "workspace_id": "<string>",
  "user_id": "<string>",
  "platform": "<string>",
  "name": "<string>",
  "base_url": "<string>",
  "metadata": {
    "type": "<string>",
    "token": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.agenhq.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Body

application/json

Fields used to create a code provider connection.

platform
required
Allowed value: "gitlab"
name
string
required

A human-readable name for the connected code provider account.

base_url
string
required

The base URL Agen should use to talk to the code hosting platform API.

metadata
object
required

Response

A code provider connection configured for a workspace.

A code provider connection configured for a workspace.

id
string
required
read-only

The unique identifier of the code provider connection inside Agen.

workspace_id
string
required
read-only

The workspace that owns this code provider connection.

user_id
string
required
read-only

The user who connected this code provider account.

platform
required
Allowed value: "gitlab"
name
string
required

A human-readable name for the connected code provider account.

base_url
string
required

The base URL Agen should use to talk to the code hosting platform API.

metadata
object
required
created_at
string<date-time>
required
read-only

When the code provider connection was created in Agen.

updated_at
string<date-time>
required
read-only

When the code provider connection was last updated in Agen.