Platform.sh Domain Management API

These endpoints can be used to add, modify, or remove domains from a project. For more information on how domains function on Upsun, see the [Domains](https://docs.upsun.com/anchors/domains/custom/) section of our documentation.

GitHub OpenAPI

Operations 10

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /projects/{projectId}/domains List a project's user-specified domains · Get list of project domains #
Ask an LLM
“Which custom domains are attached to my project?”
“Do project-level domains include the auto-assigned access site domains?”
Tell an agent
List the user-specified domains for project {projectId}.
Show custom domains on project {projectId} but not the access site ones.
POST /projects/{projectId}/domains Add a custom domain to a project · Add a project domain #
Ask an LLM
“How do I point a custom domain at my project?”
“Will a Let's Encrypt certificate be issued automatically for a project domain?”
Tell an agent
Add a custom domain to project {projectId}.
Point a new domain at project {projectId} and issue a Let's Encrypt certificate.
GET /projects/{projectId}/domains/{domainId} Get a project domain · Get a project domain #
Ask an LLM
“What are the details of one custom domain on my project?”
“Can I look up a project domain by its ID?”
Tell an agent
Get domain {domainId} on project {projectId}.
Show the configuration of custom domain {domainId} for project {projectId}.
PATCH /projects/{projectId}/domains/{domainId} Update a project domain · Update a project domain #
Ask an LLM
“Can I change the settings of a custom domain on my project?”
“How do I edit a project-level domain?”
Tell an agent
Update domain {domainId} on project {projectId}.
Change the configuration of custom domain {domainId} for project {projectId}.
DELETE /projects/{projectId}/domains/{domainId} Remove a project domain · Delete a project domain #
Ask an LLM
“How do I remove a custom domain from my project?”
“Can I delete a project-level domain I no longer use?”
Tell an agent destructive · confirm first
Delete domain {domainId} from project {projectId}.
Remove custom domain {domainId} on project {projectId}.
GET /projects/{projectId}/environments/{environmentId}/domains List an environment's user-specified domains · Get a list of environment domains #
Ask an LLM
“Which custom domains are attached to a project environment?”
“Do environment-level domains include the auto-assigned .platformsh.site subdomains?”
Tell an agent
List the user-specified domains for environment {environmentId} of project {projectId}.
Show custom domains on {environmentId} in project {projectId} but not the auto-assigned ones.
POST /projects/{projectId}/environments/{environmentId}/domains Add a domain to an environment · Add an environment domain #
Ask an LLM
“How do I point a custom domain at a non-production environment?”
“Can Platform.sh issue an SSL certificate for a domain I add to an environment?”
Tell an agent
Add a new domain to environment {environmentId} of project {projectId}.
Attach a new domain to environment {environmentId} in project {projectId} and let Let's Encrypt provision its certificate.
GET /projects/{projectId}/environments/{environmentId}/domains/{domainId} Get an environment domain · Get an environment domain #
Ask an LLM
“How do I look up a domain attached to a development environment?”
“What certificate and provisioning status does a domain have?”
Tell an agent
Show domain {domain} on environment {environmentId} in project {projectId}.
Get the SSL details of domain {domain} in {environment} ({projectId}).
PATCH /projects/{projectId}/environments/{environmentId}/domains/{domainId} Update an environment domain · Update an environment domain #
Ask an LLM
“How do I change the certificate details of a domain in a dev environment?”
“Can I update a domain's configuration after it's added?”
Tell an agent
Update domain {domain} on environment {environmentId} in project {projectId}.
Replace the SSL configuration of domain {domain} in {environment} ({projectId}) with a new certificate.
DELETE /projects/{projectId}/environments/{environmentId}/domains/{domainId} Remove a domain from an environment · Delete an environment domain #
Ask an LLM
“How do I remove a custom domain from an environment?”
“Can I delete an environment-level domain I no longer use?”
Tell an agent destructive · confirm first
Delete domain {domainId} from environment {environmentId} of project {projectId}.
Remove custom domain {domainId} on {environmentId} in project {projectId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/platform.sh:platform.sh-domain-management-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

platform.sh-domain-management-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Platform.sh Domain Management API
  version: '1.0'
  contact:
    name: Support
    url: https://upsun.com/contact-us/
  termsOfService: https://upsun.com/trust-center/legal/tos/
  x-logo:
    url: https://docs.upsun.com/images/upsun-api.svg
    href: https://upsun.com/#section/Introduction
    altText: Upsun logo
  description: 'Operations tagged Domain Management across 2 of this provider''s published API definitions: platform.sh-developer-portal-openapi-original.json, platform.sh-openapi-original.json. Each path carries the servers of the definition it was published in.'
servers:
- url: '{schemes}://api.upsun.com'
  description: The Upsun.com API gateway
  variables:
    schemes:
      default: https
tags:
- name: Domain Management
  description: 'These endpoints can be used to add, modify, or remove domains from

    a project. For more information on how domains function on

    Upsun, see the Domains

    section of our documentation.'
paths:
  /projects/{projectId}/domains:
    get:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      operationId: list-projects-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainCollection'
      tags:
      - Domain Management
      summary: Get list of project domains
      description: 'Retrieve a list of objects representing the user-specified domains

        associated with a project. Note that this does *not* return the

        domains automatically assigned to a project that appear under

        "Access site" on the user interface.'
      security:
      - OAuth2: []
    post:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      operationId: create-projects-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainCreateInput'
      tags:
      - Domain Management
      summary: Add a project domain
      description: 'Add a single domain to a project.

        If the `ssl` field is left blank without an object containing

        a PEM-encoded SSL certificate, a certificate will

        be provisioned for you via Let''s Encrypt.'
      security:
      - OAuth2: []
    servers:
    - url: '{schemes}://api.upsun.com'
      description: The Upsun.com API gateway
      variables:
        schemes:
          default: https
  /projects/{projectId}/domains/{domainId}:
    get:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: domainId
      operationId: get-projects-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Domain'
      tags:
      - Domain Management
      summary: Get a project domain
      description: 'Retrieve information about a single user-specified domain

        associated with a project.'
      security:
      - OAuth2: []
    patch:
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainPatch'
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: domainId
      operationId: update-projects-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      tags:
      - Domain Management
      summary: Update a project domain
      description: 'Update the information associated with a single user-specified

        domain associated with a project.'
      security:
      - OAuth2: []
    delete:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: domainId
      operationId: delete-projects-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      tags:
      - Domain Management
      summary: Delete a project domain
      description: Delete a single user-specified domain associated with a project.
      security:
      - OAuth2: []
    servers:
    - url: '{schemes}://api.upsun.com'
      description: The Upsun.com API gateway
      variables:
        schemes:
          default: https
  /projects/{projectId}/environments/{environmentId}/domains:
    get:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: environmentId
      operationId: list-projects-environments-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainCollection'
      tags:
      - Domain Management
      summary: Get a list of environment domains
      description: 'Retrieve a list of objects representing the user-specified domains

        associated with an environment. Note that this does *not* return the

        `.platformsh.site` subdomains, which are automatically assigned to

        the environment.'
      security:
      - OAuth2: []
    post:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: environmentId
      operationId: create-projects-environments-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainCreateInput'
      tags:
      - Domain Management
      summary: Add an environment domain
      description: 'Add a single domain to an environment.

        If the environment is not production, the `replacement_for` field

        is required, which binds a new domain to an existing one from a

        production environment.

        If the `ssl` field is left blank without an object containing

        a PEM-encoded SSL certificate, a certificate will

        be provisioned for you via Let''s Encrypt.'
      security:
      - OAuth2: []
    servers:
    - url: '{schemes}://api.upsun.com'
      description: The Upsun.com API gateway
      variables:
        schemes:
          default: https
  /projects/{projectId}/environments/{environmentId}/domains/{domainId}:
    get:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: environmentId
      - in: path
        required: true
        schema:
          type: string
        name: domainId
      operationId: get-projects-environments-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Domain'
      tags:
      - Domain Management
      summary: Get an environment domain
      description: 'Retrieve information about a single user-specified domain

        associated with an environment.'
      security:
      - OAuth2: []
    patch:
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainPatch'
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: environmentId
      - in: path
        required: true
        schema:
          type: string
        name: domainId
      operationId: update-projects-environments-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      tags:
      - Domain Management
      summary: Update an environment domain
      description: 'Update the information associated with a single user-specified

        domain associated with an environment.'
      security:
      - OAuth2: []
    delete:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: environmentId
      - in: path
        required: true
        schema:
          type: string
        name: domainId
      operationId: delete-projects-environments-domains
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      tags:
      - Domain Management
      summary: Delete an environment domain
      description: Delete a single user-specified domain associated with an environment.
      security:
      - OAuth2: []
    servers:
    - url: '{schemes}://api.upsun.com'
      description: The Upsun.com API gateway
      variables:
        schemes:
          default: https
components:
  schemas:
    ReplacementDomainStorage:
      type: object
      properties:
        id:
          type: string
          title: ReplacementDomainStorage Identifier
          description: The identifier of ReplacementDomainStorage
        created_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Creation date
          description: The creation date
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Update date
          description: The update date
        type:
          type: string
          title: Type
          description: Domain type
        project:
          type: string
          title: Project name
          description: ''
        name:
          type: string
          title: Domain name
          description: ''
        registered_name:
          type: string
          title: Claimed domain name
          description: ''
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        replacement_for:
          type: string
          title: Replacement For
          description: Prod domain which will be replaced by this domain.
      required:
      - created_at
      - updated_at
      - type
      - name
      - attributes
      additionalProperties: false
    AcceptedResponse:
      type: object
      properties:
        status:
          type: string
          title: Status text
          description: The status text of the response
        code:
          type: integer
          title: Status code
          description: The status code of the response
      required:
      - status
      - code
      additionalProperties: false
    ProdDomainStorageCreateInput:
      type: object
      properties:
        name:
          type: string
          title: Domain name
          description: ''
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        is_default:
          type: boolean
          title: Is Default
          description: Is this domain default
      required:
      - name
      additionalProperties: false
    ProdDomainStorage:
      type: object
      properties:
        id:
          type: string
          title: ProdDomainStorage Identifier
          description: The identifier of ProdDomainStorage
        created_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Creation date
          description: The creation date
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Update date
          description: The update date
        type:
          type: string
          title: Domain type
          description: ''
        project:
          type: string
          title: Project name
          description: ''
        name:
          type: string
          title: Domain name
          description: ''
        registered_name:
          type: string
          title: Claimed domain name
          description: ''
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        is_default:
          type: boolean
          title: Is Default
          description: Is this domain default
      required:
      - created_at
      - updated_at
      - type
      - name
      - attributes
      additionalProperties: false
    ReplacementDomainStorageCreateInput:
      type: object
      properties:
        name:
          type: string
          title: Domain name
          description: ''
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        replacement_for:
          type: string
          title: Replacement For
          description: Prod domain which will be replaced by this domain.
      required:
      - name
      additionalProperties: false
    DomainCollection:
      type: array
      items:
        $ref: '#/components/schemas/Domain'
    DomainPatch:
      oneOf:
      - $ref: '#/components/schemas/ProdDomainStoragePatch'
      - $ref: '#/components/schemas/ReplacementDomainStoragePatch'
    Domain:
      oneOf:
      - $ref: '#/components/schemas/ProdDomainStorage'
      - $ref: '#/components/schemas/ReplacementDomainStorage'
    ProdDomainStoragePatch:
      type: object
      properties:
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        is_default:
          type: boolean
          title: Is Default
          description: Is this domain default
      additionalProperties: false
    ReplacementDomainStoragePatch:
      type: object
      properties:
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
      additionalProperties: false
    DomainCreateInput:
      oneOf:
      - $ref: '#/components/schemas/ProdDomainStorageCreateInput'
      - $ref: '#/components/schemas/ReplacementDomainStorageCreateInput'
    ReplacementDomainStorage_2:
      type: object
      properties:
        id:
          type: string
          title: ReplacementDomainStorage Identifier
          description: The identifier of ReplacementDomainStorage
        created_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Creation date
          description: The creation date
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Update date
          description: The update date
        type:
          type: string
          title: Type
          description: Domain type
        project:
          type: string
          title: Project name
          description: The name of the project
        name:
          type: string
          title: Domain name
          description: The domain name
        registered_name:
          type: string
          title: Claimed domain name
          description: The claimed domain name
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        replacement_for:
          type: string
          title: Replacement For
          description: Prod domain which will be replaced by this domain
      required:
      - created_at
      - updated_at
      - type
      - name
      - attributes
      additionalProperties: false
    ProdDomainStorageCreateInput_2:
      type: object
      properties:
        name:
          type: string
          title: Domain name
          description: The domain name
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        is_default:
          type: boolean
          title: Is Default
          description: Is this domain default
      required:
      - name
      additionalProperties: false
    ProdDomainStorage_2:
      type: object
      properties:
        id:
          type: string
          title: ProdDomainStorage Identifier
          description: The identifier of ProdDomainStorage
        created_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Creation date
          description: The creation date
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Update date
          description: The update date
        type:
          type: string
          title: Domain type
          description: The type of domain
        project:
          type: string
          title: Project name
          description: The name of the project
        name:
          type: string
          title: Domain name
          description: The domain name
        registered_name:
          type: string
          title: Claimed domain name
          description: The claimed domain name
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        is_default:
          type: boolean
          title: Is Default
          description: Is this domain default
      required:
      - created_at
      - updated_at
      - type
      - name
      - attributes
      additionalProperties: false
    ReplacementDomainStorageCreateInput_2:
      type: object
      properties:
        name:
          type: string
          title: Domain name
          description: The domain name
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        replacement_for:
          type: string
          title: Replacement For
          description: Prod domain which will be replaced by this domain
      required:
      - name
      additionalProperties: false
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          tokenUrl: https://auth.api.platform.sh/oauth2/token
          refreshUrl: https://auth.api.platform.sh/oauth2/token
          scopes: {}
          authorizationUrl: https://auth.api.platform.sh/oauth2/authorize
      description: ''
    OAuth2Admin:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://auth.api.platform.sh/oauth2/token
          refreshUrl: ''
          scopes:
            admin: administrative operations
      description: ''
    BearerAuth:
      type: http
      scheme: bearer
x-refined-from:
- platform.sh-developer-portal-openapi-original.json
- platform.sh-openapi-original.json
x-tagGroups:
- name: Organization Administration
  tags:
  - Organizations
  - Organization Members
  - Organization Invitations
  - Organization Projects
  - Add-ons
- name: Project Administration
  tags:
  - Project
  - Domain Management
  - Cert Management
  - Certificate Provisioner
  - Project Variables
  - Repository
  - Third-Party Integrations
  - Support
- name: Environments
  tags:
  - Environment
  - Environment Backups
  - Environment Type
  - Environment Variables
  - Routing
  - Source Operations
  - Runtime Operations
  - Deployment
  - Autoscaling
- name: User Activity
  tags:
  - Project Activity
  - Environment Activity
- name: Project Access
  tags:
  - Project Invitations
  - Teams
  - Team Access
  - User Access
- name: Account Management
  tags:
  - API Tokens
  - Connections
  - MFA
  - Users
  - User Profiles
  - SSH Keys
  - Plans
- name: Billing
  tags:
  - Organization Management
  - Subscriptions
  - Orders
  - Invoices
  - Discounts
  - Vouchers
  - Records
  - Profiles
- name: Global Info
  tags:
  - Project Discovery
  - References
  - Regions
- name: Internal APIs
  tags:
  - Project Settings
  - Environment Settings
  - Deployment Target
  - System Information
  - Container Profile
x-provenance:
  method: harvested
  publisher: Platform.sh
  source: https://developer.upsun.com/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)