Projects

Package: agentrouter.tenancy.v1 Service: ProjectsService

Endpoints

Create a project

What it does: Creates a project within a customer scope.

Request fields:

FieldRequiredDescription
customer_idyesOwning customer slug.
project_idyesRequired: customer-scoped project slug.
display_namenoOptional: human-friendly display name.
descriptionnoOptional: freeform description.

Response fields:

FieldRequiredDescription
idoutput-onlyundocumented
customer_idyesundocumented
project_idyesundocumented
display_namenoundocumented
descriptionnoundocumented
stateoutput-onlyundocumented
labelsnoundocumented
created_atoutput-onlyundocumented
updated_atoutput-onlyundocumented
archived_atoutput-onlyundocumented
{"signatures":{"go":"func (p *ProjectsClient) Create(ctx context.Context, customerID, projectID, displayName, description string) (*tenancyv1.Project, error)","python":"create(customer_id: str, project_id: str, display_name: str, description: str) -\u003e Project","typescript":"create(customerId: string, projectId: string, displayName, description): Promise\u003cProject\u003e","cli":"tare api projects create --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"project_id\": \"...\",\n    \"display_name\": \"...\",\n    \"description\": \"...\"\n  }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID  string\n\tProjectID   string\n\tDisplayName string\n\tDescription string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID:  \"cust_01H...\",\n\t\tProjectID:   \"proj_01H...\",\n\t\tDisplayName: \"...\",\n\t\tDescription: \"...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tdisplayName := in.DisplayName\n\tdescription := in.Description\n\tresult, err := client.Projects().Create(ctx, customerID, projectID, displayName, description)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/projects/createproject\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n    base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n    api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\ndisplay_name = \"...\"\ndescription = \"...\"\ntry:\n    result = client.projects.create(customer_id, project_id, display_name, description)\n    print(result)\nexcept Exception as err:\n    print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n#   agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n  baseUrl: process.env.AGENTROUTER_BASE_URL,\n  apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\nconst displayName = \"...\"\nconst description = \"...\"\ntry {\n  const result = await client.projects.create(customerId, projectId, displayName, description)\n  console.log(result)\n} catch (err) {\n  console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n  \"name\": \"projects\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^20.0.0\",\n    \"typescript\": \"^5.4.0\"\n  }\n}\n"},{"name":"tsconfig.json","content":"{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"}]},"cli":"tare api projects create --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"project_id\": \"...\",\n    \"display_name\": \"...\",\n    \"description\": \"...\"\n  }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/v1/customers/{customer_id}/projects","slug":"create-a-project"}

Get a project

What it does: Returns a single project by id.

Request fields:

FieldRequiredDescription
customer_idyesRequired: owning customer slug.
project_idyesRequired: customer-scoped slug of the project to fetch.

Response fields:

FieldRequiredDescription
idoutput-onlyundocumented
customer_idyesundocumented
project_idyesundocumented
display_namenoundocumented
descriptionnoundocumented
stateoutput-onlyundocumented
labelsnoundocumented
created_atoutput-onlyundocumented
updated_atoutput-onlyundocumented
archived_atoutput-onlyundocumented
{"signatures":{"go":"func (p *ProjectsClient) Get(ctx context.Context, customerID, projectID string) (*tenancyv1.Project, error)","python":"get(customer_id: str, project_id: str) -\u003e Project","typescript":"get(customerId: string, projectId: string): Promise\u003cProject\u003e","cli":"tare api projects get --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID  string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID:  \"proj_01H...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tresult, err := client.Projects().Get(ctx, customerID, projectID)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/projects/getproject\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n    base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n    api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\ntry:\n    result = client.projects.get(customer_id, project_id)\n    print(result)\nexcept Exception as err:\n    print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n#   agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n  baseUrl: process.env.AGENTROUTER_BASE_URL,\n  apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\ntry {\n  const result = await client.projects.get(customerId, projectId)\n  console.log(result)\n} catch (err) {\n  console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n  \"name\": \"projects\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^20.0.0\",\n    \"typescript\": \"^5.4.0\"\n  }\n}\n"},{"name":"tsconfig.json","content":"{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"}]},"cli":"tare api projects get --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}","slug":"get-a-project"}

List projects

What it does: Lists projects within a customer scope.

Request fields:

FieldRequiredDescription
customer_idyesRequired: customer scope whose projects to list.
pagenoCursor-pagination inputs (page size, page token, filter, order_by).

Response fields:

FieldRequiredDescription
projectsnoPage of projects within the requested customer scope.
pagenoPagination outputs; carries next_page_token for the following page.
{"signatures":{"go":"func (p *ProjectsClient) List(ctx context.Context, customerID string) (*tenancyv1.ListProjectsResponse, error)","python":"list(customer_id: str) -\u003e ListProjectsResponse","typescript":"list(customerId: string): Promise\u003cListProjectsResponse\u003e","cli":"tare api projects list --customer-id $CUSTOMER_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tresult, err := client.Projects().List(ctx, customerID)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/projects/listprojects\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n    base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n    api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\ntry:\n    result = client.projects.list(customer_id)\n    print(result)\nexcept Exception as err:\n    print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n#   agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n  baseUrl: process.env.AGENTROUTER_BASE_URL,\n  apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\ntry {\n  const result = await client.projects.list(customerId)\n  console.log(result)\n} catch (err) {\n  console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n  \"name\": \"projects\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^20.0.0\",\n    \"typescript\": \"^5.4.0\"\n  }\n}\n"},{"name":"tsconfig.json","content":"{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"}]},"cli":"tare api projects list --customer-id $CUSTOMER_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Admin","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects","slug":"list-projects"}

Update a project

What it does: Updates mutable project fields.

Request fields:

FieldRequiredDescription
customer_idyesRequired: owning customer slug. Immutable.
project_idyesRequired: the project to update. Immutable.
display_namenoOptional: new display name.
descriptionnoOptional: new description.

Response fields:

FieldRequiredDescription
idoutput-onlyundocumented
customer_idyesundocumented
project_idyesundocumented
display_namenoundocumented
descriptionnoundocumented
stateoutput-onlyundocumented
labelsnoundocumented
created_atoutput-onlyundocumented
updated_atoutput-onlyundocumented
archived_atoutput-onlyundocumented
{"signatures":{"go":"func (p *ProjectsClient) Update(ctx context.Context, req *tenancyv1.UpdateProjectRequest) (*tenancyv1.Project, error)","python":"update(customer_id: str, project_id: str, display_name: str, description: str) -\u003e Project","typescript":"update(customerId: string, projectId: string, displayName, description): Promise\u003cProject\u003e","cli":"tare api projects update --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl -X PATCH \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"display_name\": \"...\",\n    \"description\": \"...\"\n  }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\ttenancyv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/tenancy/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026tenancyv1.UpdateProjectRequest{}\n\n\tresp, err := client.Projects().Update(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/projects/updateproject\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n    base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n    api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\ndisplay_name = \"...\"\ndescription = \"...\"\ntry:\n    result = client.projects.update(customer_id, project_id, display_name, description)\n    print(result)\nexcept Exception as err:\n    print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n#   agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n  baseUrl: process.env.AGENTROUTER_BASE_URL,\n  apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\nconst displayName = \"...\"\nconst description = \"...\"\ntry {\n  const result = await client.projects.update(customerId, projectId, displayName, description)\n  console.log(result)\n} catch (err) {\n  console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n  \"name\": \"projects\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^20.0.0\",\n    \"typescript\": \"^5.4.0\"\n  }\n}\n"},{"name":"tsconfig.json","content":"{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"}]},"cli":"tare api projects update --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl -X PATCH \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"display_name\": \"...\",\n    \"description\": \"...\"\n  }'"},"persona":"Authenticated (API key or session token)","httpVerb":"PATCH","httpPath":"/v1/customers/{customer_id}/projects/{project_id}","slug":"update-a-project"}

Archive a project

What it does: Soft-deletes a project. Refuses to archive the default project, matching the existing admin.v1 behaviour.

Request fields:

FieldRequiredDescription
customer_idyesRequired: owning customer slug.
project_idyesRequired: the project to soft-delete (the default project cannot be archived).
{"signatures":{"go":"func (p *ProjectsClient) Archive(ctx context.Context, customerID, projectID string) error","python":"archive(customer_id: str, project_id: str) -\u003e None","typescript":"archive(customerId: string, projectId: string): Promise\u003cvoid\u003e","cli":"tare api projects archive --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID  string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID:  \"proj_01H...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tif err := client.Projects().Archive(ctx, customerID, projectID); err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Println(\"ok\")\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/projects/archiveproject\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n    base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n    api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\ntry:\n    result = client.projects.archive(customer_id, project_id)\n    print(result)\nexcept Exception as err:\n    print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n#   agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n  baseUrl: process.env.AGENTROUTER_BASE_URL,\n  apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\ntry {\n  const result = await client.projects.archive(customerId, projectId)\n  console.log(result)\n} catch (err) {\n  console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n  \"name\": \"projects\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^20.0.0\",\n    \"typescript\": \"^5.4.0\"\n  }\n}\n"},{"name":"tsconfig.json","content":"{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"}]},"cli":"tare api projects archive --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"DELETE","httpPath":"/v1/customers/{customer_id}/projects/{project_id}","slug":"archive-a-project"}

Add a project member

What it does: Grants an identity access to a project with the given role bundle.

Request fields:

FieldRequiredDescription
customer_idyesRequired: owning customer slug.
project_idyesRequired: project the identity is being granted access to.
identity_idyesIdentity row id (authn.user.id). Required.
roleyesRole bundle: "admin" or "member".

Response fields:

FieldRequiredDescription
idoutput-onlyundocumented
customer_idoutput-onlyundocumented
project_idoutput-onlyundocumented
identity_idyesundocumented
roleyesundocumented
created_atoutput-onlyundocumented
updated_atoutput-onlyundocumented
{"signatures":{"go":"func (p *ProjectsClient) AddMember(ctx context.Context, customerID, projectID, identityID, role string) (*tenancyv1.ProjectMember, error)","python":"add_member(customer_id: str, project_id: str, identity_id: str, role: str) -\u003e ProjectMember","typescript":"addMember(customerId: string, projectId: string, identityId: string, role: string): Promise\u003cProjectMember\u003e","cli":"tare api projects members add --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --identity-id $IDENTITY_ID --role $ROLE","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../members\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"identity_id\": \"...\",\n    \"role\": \"...\"\n  }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID  string\n\tIdentityID string\n\tRole       string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID:  \"proj_01H...\",\n\t\tIdentityID: \"id_01H...\",\n\t\tRole:       \"member\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tidentityID := in.IdentityID\n\trole := in.Role\n\tresult, err := client.Projects().AddMember(ctx, customerID, projectID, identityID, role)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/projects/addprojectmember\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n    base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n    api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\nidentity_id = \"id_01H...\"\nrole = \"member\"\ntry:\n    result = client.projects.add_member(customer_id, project_id, identity_id, role)\n    print(result)\nexcept Exception as err:\n    print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n#   agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n  baseUrl: process.env.AGENTROUTER_BASE_URL,\n  apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\nconst identityId = \"id_01H...\"\nconst role = \"member\"\ntry {\n  const result = await client.projects.addMember(customerId, projectId, identityId, role)\n  console.log(result)\n} catch (err) {\n  console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n  \"name\": \"projects\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^20.0.0\",\n    \"typescript\": \"^5.4.0\"\n  }\n}\n"},{"name":"tsconfig.json","content":"{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"}]},"cli":"tare api projects members add --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --identity-id $IDENTITY_ID --role $ROLE","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../members\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"identity_id\": \"...\",\n    \"role\": \"...\"\n  }'"},"persona":"Authenticated (API key or session token)","httpVerb":"POST","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/members","slug":"add-a-project-member"}

List project members

What it does: Lists all members of a project and their roles.

Request fields:

FieldRequiredDescription
customer_idyesRequired: owning customer slug.
project_idyesRequired: project whose members to list.
pagenoCursor-pagination inputs (page size, page token, filter, order_by).

Response fields:

FieldRequiredDescription
membersnoPage of members assigned to the requested project, with their roles.
pagenoPagination outputs; carries next_page_token for the following page.
{"signatures":{"go":"func (p *ProjectsClient) ListMembers(ctx context.Context, customerID, projectID string) (*tenancyv1.ListProjectMembersResponse, error)","python":"list_members(customer_id: str, project_id: str) -\u003e ListProjectMembersResponse","typescript":"listMembers(customerId: string, projectId: string): Promise\u003cListProjectMembersResponse\u003e","cli":"tare api projects members list --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../members\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID  string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID:  \"proj_01H...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tresult, err := client.Projects().ListMembers(ctx, customerID, projectID)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/projects/listprojectmembers\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n    base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n    api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\ntry:\n    result = client.projects.list_members(customer_id, project_id)\n    print(result)\nexcept Exception as err:\n    print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n#   agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n  baseUrl: process.env.AGENTROUTER_BASE_URL,\n  apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\ntry {\n  const result = await client.projects.listMembers(customerId, projectId)\n  console.log(result)\n} catch (err) {\n  console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n  \"name\": \"projects\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^20.0.0\",\n    \"typescript\": \"^5.4.0\"\n  }\n}\n"},{"name":"tsconfig.json","content":"{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"}]},"cli":"tare api projects members list --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../members\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/members","slug":"list-project-members"}

Update a project member

What it does: Updates an existing project member's role.

Request fields:

FieldRequiredDescription
customer_idyesRequired: owning customer slug.
project_idyesRequired: project the membership belongs to.
identity_idyesRequired: identity row id (authn.user.id) whose role is being changed.
roleyesRequired: new role bundle: "admin" or "member".

Response fields:

FieldRequiredDescription
idoutput-onlyundocumented
customer_idoutput-onlyundocumented
project_idoutput-onlyundocumented
identity_idyesundocumented
roleyesundocumented
created_atoutput-onlyundocumented
updated_atoutput-onlyundocumented
{"signatures":{"go":"func (p *ProjectsClient) UpdateMember(ctx context.Context, customerID, projectID, identityID, role string) (*tenancyv1.ProjectMember, error)","python":"update_member(customer_id: str, project_id: str, identity_id: str, role: str) -\u003e ProjectMember","typescript":"updateMember(customerId: string, projectId: string, identityId: string, role: string): Promise\u003cProjectMember\u003e","cli":"tare api projects members update --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --identity-id $IDENTITY_ID --role $ROLE","curl":"curl -X PATCH \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../members/id_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"role\": \"...\"\n  }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID  string\n\tIdentityID string\n\tRole       string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID:  \"proj_01H...\",\n\t\tIdentityID: \"id_01H...\",\n\t\tRole:       \"member\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tidentityID := in.IdentityID\n\trole := in.Role\n\tresult, err := client.Projects().UpdateMember(ctx, customerID, projectID, identityID, role)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/projects/updateprojectmember\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n    base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n    api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\nidentity_id = \"id_01H...\"\nrole = \"member\"\ntry:\n    result = client.projects.update_member(customer_id, project_id, identity_id, role)\n    print(result)\nexcept Exception as err:\n    print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n#   agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n  baseUrl: process.env.AGENTROUTER_BASE_URL,\n  apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\nconst identityId = \"id_01H...\"\nconst role = \"member\"\ntry {\n  const result = await client.projects.updateMember(customerId, projectId, identityId, role)\n  console.log(result)\n} catch (err) {\n  console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n  \"name\": \"projects\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^20.0.0\",\n    \"typescript\": \"^5.4.0\"\n  }\n}\n"},{"name":"tsconfig.json","content":"{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"}]},"cli":"tare api projects members update --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --identity-id $IDENTITY_ID --role $ROLE","curl":"curl -X PATCH \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../members/id_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"role\": \"...\"\n  }'"},"persona":"Authenticated (API key or session token)","httpVerb":"PATCH","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/members/{identity_id}","slug":"update-a-project-member"}

Remove a project member

What it does: Revokes an identity's membership in a project.

Request fields:

FieldRequiredDescription
customer_idyesRequired: owning customer slug.
project_idyesRequired: project the membership belongs to.
identity_idyesRequired: identity row id (authn.user.id) whose membership is revoked.
{"signatures":{"go":"func (p *ProjectsClient) RemoveMember(ctx context.Context, customerID, projectID, identityID string) error","python":"remove_member(customer_id: str, project_id: str, identity_id: str) -\u003e None","typescript":"removeMember(customerId: string, projectId: string, identityId: string): Promise\u003cvoid\u003e","cli":"tare api projects members remove --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --identity-id $IDENTITY_ID","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../members/id_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID  string\n\tIdentityID string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID:  \"proj_01H...\",\n\t\tIdentityID: \"id_01H...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tidentityID := in.IdentityID\n\tif err := client.Projects().RemoveMember(ctx, customerID, projectID, identityID); err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Println(\"ok\")\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/projects/removeprojectmember\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n    base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n    api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\nidentity_id = \"id_01H...\"\ntry:\n    result = client.projects.remove_member(customer_id, project_id, identity_id)\n    print(result)\nexcept Exception as err:\n    print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n#   agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n  baseUrl: process.env.AGENTROUTER_BASE_URL,\n  apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\nconst identityId = \"id_01H...\"\ntry {\n  const result = await client.projects.removeMember(customerId, projectId, identityId)\n  console.log(result)\n} catch (err) {\n  console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n  \"name\": \"projects\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"^20.0.0\",\n    \"typescript\": \"^5.4.0\"\n  }\n}\n"},{"name":"tsconfig.json","content":"{\n  \"compilerOptions\": {\n    \"target\": \"ES2020\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  }\n}\n"}]},"cli":"tare api projects members remove --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --identity-id $IDENTITY_ID","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../members/id_01H...\" \\\n  -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"DELETE","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/members/{identity_id}","slug":"remove-a-project-member"}