{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Connects one of your users, identified by `user_id`, to a provider so tools can act on their\naccount. An OAuth connection starts pending, and authorization carries the URL to send the user to;\nread the connection until it is active or expired. A connection through a team API-key credential is\nactive immediately. Register the API key with `POST /v2/action-gateway/provider-credentials`\nfirst, then set `credential.team_credential.credential_id` to the returned `credential.id`.\n\nThere is one connection per provider and `user_id` for each DigitalOcean user who creates\nconnections. Repeating the request returns the existing connection when its scopes cover the\nrequest, reusing a pending connection's link, and restarts an expired or revoked connection under\nthe same ID. Requesting scopes beyond an existing connection's, or a different credential, returns\n400 until that connection is deleted.","properties":{"body":{"$ref":"#/definitions/connection_create","examples":[{"provider":"jira","user_id":"alice","scopes":["write:jira-work"],"connection_parameters":{"site_url":"https://example.atlassian.net"},"credential":{"digitalocean_oauth":{}}}]}},"required":["body"],"additionalProperties":false,"definitions":{"connection_create":{"type":"object","required":["provider","user_id"],"properties":{"provider":{"type":"string","description":"Required provider slug, from the provider list.","examples":["jira"]},"user_id":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$","description":"Required. Your identifier for the user the connection acts for: 1 to 64 characters from `[A-Za-z0-9._-]`. A session whose `actor_id` equals it uses this connection.","examples":["alice"]},"scopes":{"type":"array","description":"Optional OAuth scopes to request. Defaults to every scope the provider offers; scopes outside that set are rejected. Ignored for API-key credentials.","items":{"type":"string"},"examples":[["write:jira-work"]]},"connection_parameters":{"type":"object","description":"Values for the provider's `connection_parameters`, validated against their specifications.","examples":[{"site_url":"https://example.atlassian.net"}]},"credential":{"type":"object","description":"Optional credential to connect through. Omitted uses DigitalOcean's shared OAuth application.","properties":{"digitalocean_oauth":{"type":"object","description":"Use DigitalOcean's shared OAuth application.","properties":{}},"team_credential":{"type":"object","description":"Use one of your team's provider credentials.","properties":{"credential_id":{"type":"string","description":"Required. ID of an active provider credential for the same provider that you can use.","examples":["8d6f2b1a-3c4e-4d5f-9a8b-7c6d5e4f3a2b"]}}}}},"network":{"type":"object","description":"Optional private network for the connection's calls. Requires VPC networking to be enabled for your account (403 otherwise).","properties":{"vpc":{"type":"object","properties":{"vpc_uuid":{"type":"string","format":"uuid","description":"UUID of a VPC owned by your team.","examples":["5a4981aa-9653-4bd1-bef5-d6bff52042e4"]},"destinations":{"type":"array","items":{"type":"object","properties":{"host":{"type":"string","description":"Host name or IP address. It must resolve only to private addresses.","examples":["jira.internal.example.com"]},"port":{"type":"integer","description":"Port, 1 to 65535.","examples":[443]},"allowed_ip_cidrs":{"type":"array","items":{"type":"string"},"description":"Optional CIDR ranges; when set, every address the host resolves to must fall within one of them.","examples":[["10.116.0.0/20"]]}}},"description":"Private hosts the connection's calls may reach through the VPC. At least one is required."}},"description":"Route through a VPC."}}}},"description":"Describes a connection to create."}}},"name":"Create a Connection","id":"digitalocean.connections_create","example":{"body":{"provider":"jira","user_id":"alice"}},"maxRequests":1,"summary":false}}