Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Shashank-H/gaiter-gaurd/llms.txt

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

All agent endpoints require authentication via Bearer token.

List agents

Retrieve all agents for the authenticated user.

Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer <jwt>

Response

Returns an array of agent objects.
agents
object[]

Status codes

  • 200 - Agents retrieved successfully
  • 401 - Unauthorized (missing or invalid token)
  • 500 - Internal server error
curl --request GET \
  --url https://api.gaiterguard.com/agents \
  --header 'Authorization: Bearer <jwt>'
[
  {
    "id": 1,
    "userId": 1,
    "name": "Production Agent",
    "keyPrefix": "gg_prod_abc1",
    "isActive": true,
    "lastUsedAt": "2026-03-03T22:49:00.000Z",
    "services": [
      {
        "id": 1,
        "name": "GitHub API"
      }
    ],
    "createdAt": "2026-03-01T10:00:00.000Z",
    "updatedAt": "2026-03-03T22:49:00.000Z"
  }
]

Create agent

Create a new agent with an API key and service permissions.
The full API key is only shown once during creation. Store it securely.

Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer <jwt>

Request body

name
string
required
Agent name (3-100 characters).
serviceIds
number[]
required
Array of service IDs this agent can access. Must contain at least one valid service ID owned by the user.

Response

agent
object
apiKey
string
Full API key. Only returned during creation. Store securely.

Status codes

  • 201 - Agent created successfully
  • 400 - Validation error (invalid request body)
  • 401 - Unauthorized (missing or invalid token)
  • 404 - One or more service IDs not found
  • 500 - Internal server error
curl --request POST \
  --url https://api.gaiterguard.com/agents \
  --header 'Authorization: Bearer <jwt>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Production Agent",
    "serviceIds": [1, 2]
  }'
{
  "agent": {
    "id": 1,
    "userId": 1,
    "name": "Production Agent",
    "keyPrefix": "gg_prod_abc1",
    "isActive": true,
    "services": [
      {
        "id": 1,
        "name": "GitHub API"
      },
      {
        "id": 2,
        "name": "Stripe API"
      }
    ],
    "createdAt": "2026-03-03T22:49:00.000Z",
    "updatedAt": "2026-03-03T22:49:00.000Z"
  },
  "apiKey": "gg_prod_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz"
}

Get agent

Retrieve a single agent by ID. Ownership is verified.

Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer <jwt>

Path parameters

id
number
required
Agent ID.

Response

id
number
Unique agent identifier.
userId
number
Owner user ID.
name
string
Agent name.
keyPrefix
string
First 12 characters of the API key.
isActive
boolean
Whether the agent is active.
lastUsedAt
string
ISO 8601 timestamp of last API request.
services
object[]
Array of services this agent can access.
createdAt
string
ISO 8601 timestamp of agent creation.
updatedAt
string
ISO 8601 timestamp of last update.

Status codes

  • 200 - Agent retrieved successfully
  • 400 - Invalid agent ID
  • 401 - Unauthorized (missing or invalid token)
  • 404 - Agent not found
  • 500 - Internal server error
curl --request GET \
  --url https://api.gaiterguard.com/agents/1 \
  --header 'Authorization: Bearer <jwt>'
{
  "id": 1,
  "userId": 1,
  "name": "Production Agent",
  "keyPrefix": "gg_prod_abc1",
  "isActive": true,
  "lastUsedAt": "2026-03-03T22:49:00.000Z",
  "services": [
    {
      "id": 1,
      "name": "GitHub API"
    }
  ],
  "createdAt": "2026-03-01T10:00:00.000Z",
  "updatedAt": "2026-03-03T22:49:00.000Z"
}

Update agent

Update agent details (name or active status).

Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer <jwt>

Path parameters

id
number
required
Agent ID.

Request body

name
string
Agent name (3-100 characters). Optional.
isActive
boolean
Whether the agent is active. Set to false to revoke access. Optional.
At least one field must be provided for update.

Response

Returns the updated agent object.

Status codes

  • 200 - Agent updated successfully
  • 400 - Validation error (invalid agent ID or request body)
  • 401 - Unauthorized (missing or invalid token)
  • 404 - Agent not found
  • 500 - Internal server error
curl --request PUT \
  --url https://api.gaiterguard.com/agents/1 \
  --header 'Authorization: Bearer <jwt>' \
  --header 'Content-Type: application/json' \
  --data '{
    "isActive": false
  }'
{
  "id": 1,
  "userId": 1,
  "name": "Production Agent",
  "keyPrefix": "gg_prod_abc1",
  "isActive": false,
  "lastUsedAt": "2026-03-03T22:49:00.000Z",
  "services": [
    {
      "id": 1,
      "name": "GitHub API"
    }
  ],
  "createdAt": "2026-03-01T10:00:00.000Z",
  "updatedAt": "2026-03-03T23:15:00.000Z"
}

Delete agent

Delete an agent. This cascades to delete all agent-service associations.
This action is irreversible. The agent’s API key will be permanently revoked.

Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer <jwt>

Path parameters

id
number
required
Agent ID.

Response

message
string
Success message confirming deletion.

Status codes

  • 200 - Agent deleted successfully
  • 400 - Invalid agent ID
  • 401 - Unauthorized (missing or invalid token)
  • 404 - Agent not found
  • 500 - Internal server error
curl --request DELETE \
  --url https://api.gaiterguard.com/agents/1 \
  --header 'Authorization: Bearer <jwt>'
{
  "message": "Agent deleted"
}

Update agent services

Update the services an agent can access. This replaces all existing service associations.
This replaces ALL service associations. Any services not included will be removed from the agent’s access.

Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer <jwt>

Path parameters

id
number
required
Agent ID.

Request body

serviceIds
number[]
required
Array of service IDs this agent can access. Must contain at least one valid service ID owned by the user.

Response

message
string
Success message confirming service update.
services
object[]
Array of services this agent can now access.

Status codes

  • 200 - Agent services updated successfully
  • 400 - Validation error (invalid agent ID or request body)
  • 401 - Unauthorized (missing or invalid token)
  • 404 - Agent or one or more services not found
  • 500 - Internal server error
curl --request PUT \
  --url https://api.gaiterguard.com/agents/1/services \
  --header 'Authorization: Bearer <jwt>' \
  --header 'Content-Type: application/json' \
  --data '{
    "serviceIds": [1, 3]
  }'
{
  "message": "Agent services updated",
  "services": [
    {
      "id": 1,
      "name": "GitHub API"
    },
    {
      "id": 3,
      "name": "Slack API"
    }
  ]
}

Build docs developers (and LLMs) love