Skip to main content
POST
cURL

Body

application/json
type
enum<string>
required

The service type: http for an HTTP API, mcp for a remote MCP server, or postgres, mysql or ssh for a database or SSH server the agent reaches with infisical agent-vault connect. Can't be changed after the service is created.

Available options:
http
name
string
required

The name of the service, unique in the Agent Vault project.

Required string length: 1 - 64
hostPattern
string
required

A comma-separated set of hosts this service covers, each optionally with a port (defaults to 443). A leading *. wildcard matches exactly one label. Paths are not supported.

Maximum string length: 1024
credential
Bearer · object
required
description
string

What the service is for, such as what an agent can do with it and when to use it. Up to 256 characters, without line breaks or invisible characters. Agents in a session can read it, so never put a credential or any other secret in it.

Maximum string length: 256
Pattern: ^[^\x00-\x1f\x7f]*$
allowedMethods
enum<string>[] | null

The HTTP methods this service allows. Null allows every method. Anything else is refused by the proxy with a 403.

Required array length: 1 - 7 elements
Available options:
GET,
HEAD,
POST,
PUT,
PATCH,
DELETE,
OPTIONS
allowedPathPrefixes
string[] | null

The path prefixes this service allows, matched on whole segments, so /repos covers /repos/octo but not /repositories. null allows every path. A path-restricted service also refuses any request whose path would have to be normalised to judge.

Required array length: 1 - 20 elements
customHeaders
object[]

Additional headers the proxy attaches to every request to this service, on top of the credential. Send the full list. A header you leave out is deleted. Send a header's id to change it in place and keep its stored value. Without an id, a header is matched by name.

Maximum array length: 20
substitutions
object[]

Placeholders the proxy swaps for a real secret before forwarding. Send the full list. A substitution you leave out is deleted. Send a substitution's id to change it in place and keep its stored value. Without an id, it is matched by its placeholder.

Maximum array length: 20
hook
object

A saved hook of the project for the proxy to ask before it sends this service's requests, by name. Narrow it with methods and paths (HTTP) or tools (MCP), or leave those out to ask about every request, or every connection for a database or SSH service. Needs permission to read hooks.

projectId
string

The ID of the Agent Vault project.

Required string length: 1 - 36
accessBundleIds
string<uuid>[]

The access bundles to add the service to, all in the same Agent Vault project. Leave out to create it in no bundle and add it later.

Maximum array length: 25

Response

Default Response

service
HTTP · object
required