Rotate a Cloudflare connector token
POST
/api/integrations/cloudflare/connectors/{id}/token
const url = 'https://gateway.example.com/api/integrations/cloudflare/connectors/550e8400-e29b-41d4-a716-446655440000/token';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gateway.example.com/api/integrations/cloudflare/connectors/550e8400-e29b-41d4-a716-446655440000/token \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
550e8400-e29b-41d4-a716-446655440000Request Bodyrequired
Section titled “Request Bodyrequired”JSON request body
Media typeapplication/json
object
token
required
string
Examplegenerated
{ "token": "example"}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
data
required
object
id
required
string format: uuid
provider
required
string
name
required
string
baseUrl
required
string
enabled
required
boolean
allowlistMode
required
string
settings
required
object
autoSyncEnabled
required
boolean
autoSyncIntervalSeconds
required
number
defaultTtl
required
number
defaultProxied
required
boolean
capabilities
required
object
key
additional properties
boolean
syncStatus
required
string
syncLastError
string | null
syncFailureCount
required
number
syncStartedAt
string | null
syncFinishedAt
string | null
syncLastOverlapAt
string | null
syncNextRetryAt
string | null
testedAt
string | null
createdAt
required
string
updatedAt
required
string
hasToken
required
boolean
tokenMasked
required
string | null
zones
required
Array<object>
object
id
string format: uuid
connectorId
string format: uuid
remoteId
required
string
name
required
string
status
string | null
accountId
string | null
accountName
string | null
lastSeenAt
string
metadata
object
key
additional properties
createdAt
string
updatedAt
string
Example
{ "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Example resource", "createdAt": "2024-01-01T12:00:00.000Z", "updatedAt": "2024-01-01T12:30:00.000Z" }}Bad request
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "VALIDATION_ERROR", "message": "Request validation failed", "details": [ { "path": [ "name" ], "message": "Required" } ]}Authentication required
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "UNAUTHORIZED", "message": "Authentication required"}Forbidden
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "FORBIDDEN", "message": "Insufficient permissions"}Not found
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "NOT_FOUND", "message": "Resource not found"}Conflict
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "CONFLICT", "message": "Resource already exists"}Unprocessable entity
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "UNPROCESSABLE_ENTITY", "message": "Request could not be processed"}Internal server error
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "INTERNAL_ERROR", "message": "Internal server error"}