Add a cluster. The response has the command that connects its first server.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonAdd a cluster. The response has the command that connects its first server.
API key access: full.
op*"createCluster""createCluster"id*stringA new id you choose: cl_ then 4 to 40 lowercase letters, digits, dashes or underscores.
teamId*stringname*stringdescription?stringlocation*stringWhere it is, "City, CC" or a region name.
tags?array<string>thisMachine?booleanThe machine Pyo itself runs on, connected with a command run there.
publicApiUrl?|Connect over the public internet instead of the tailnet: the agent reaches Pyo at this URL (where you use Pyo). Services Pyo builds can't run there (its registry is on the tailnet only).
Done. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"id": "cl_8kq2x7ad",
"location": "Singapore, SG",
"name": "edge",
"op": "createCluster",
"teamId": "team_8kq2x7ad"
}'{}