/v1/agentTokens/addToken
—
post

Create a new agent token for API authentication. Agent tokens allow external applications and services to authenticate with the fimidara API.

Path Parameters
Not Applicable
Request Headers
HttpEndpointRequestHeaders_AuthRequired_JsonContentType

FieldTypeRequiredDescription
AuthorizationstringYes

Access token

Example: Bearer <token>

Content-TypestringYes

HTTP JSON request content type

Example: application/json

Request Query
Not Applicable
Request Body
AddAgentTokenEndpointParams

Parameters for creating a new agent token

{
workspaceId?: string
name?: string
description?: string
expiresAt?: number
providedResourceId?: string
shouldEncode?: boolean
shouldRefresh?: boolean
refreshDuration?: number
}
200 — Response Headers
HttpEndpointResponseHeaders_ContentType_ContentLength

FieldTypeRequiredDescription
Content-TypestringYes

HTTP JSON response content type

Example: application/json

Content-LengthstringYes

HTTP response content length in bytes

Example: 1024

200 — Response Body
AddAgentTokenEndpointResult

Response containing the newly created agent token

{
token: AgentToken
}
AgentToken

Agent token with authentication details and metadata

{
resourceId: string
createdBy: Agent
createdAt: number
lastUpdatedBy: Agent
lastUpdatedAt: number
isDeleted: boolean
deletedAt?: number
deletedBy?: Agent
workspaceId: string
name?: string
description?: string
jwtToken?: string
refreshToken?: string
expiresAt?: number
providedResourceId?: string | null
jwtTokenExpiresAt?: number
shouldRefresh?: boolean
refreshDuration?: number
}
Agent

Represents a user or system entity that performed an action (e.g., created or updated a resource)

{
agentId: string
agentType: string
}
4XX or 5XX — Response Headers
HttpEndpointResponseHeaders_ContentType_ContentLength

FieldTypeRequiredDescription
Content-TypestringYes

HTTP JSON response content type

Example: application/json

Content-LengthstringYes

HTTP response content length in bytes

4XX or 5XX — Response Body
EndpointErrorResult

Endpoint error result

{
errors?: Array<ExternalError>
}
ExternalError

{
message: string
}