> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymorfa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Restore customer

> Restores an archived Customer.

Requires `customers:manage`. Project tokens only access resources in their own project.



## OpenAPI

````yaml api-reference/features/manage-polymorfa.json POST /platform/customers/{customerId}/restore
openapi: 3.0.3
info:
  title: Manage Polymorfa API methods
  version: 1.0.0
  description: >-
    Task-focused manage polymorfa methods across supported Polymorfa connection
    types.
servers: []
security: []
paths:
  /platform/customers/{customerId}/restore:
    post:
      tags:
        - Customers
      summary: Restore customer
      description: >-
        Restores an archived Customer.


        Requires `customers:manage`. Project tokens only access resources in
        their own project.
      operationId: managementRestoreCustomer
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: |-
            Identifier for the customer.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
          description: |-
            Specifies idempotency key for this header parameter.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | `1` through `255` characters |
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/management__CustomerProjectRequest'
      responses:
        '200':
          description: Success
          headers:
            X-Request-Id:
              schema:
                type: string
              description: Stable request correlation identifier.
            Polymorfa-Version:
              schema:
                type: string
              description: API version applied to this response.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/management__Customer'
                    description: Structured data carried by this object.
                required:
                  - data
        '400':
          $ref: '#/components/responses/management__BadRequest'
        '401':
          $ref: '#/components/responses/management__Unauthorized'
        '403':
          $ref: '#/components/responses/management__Forbidden'
        '404':
          $ref: '#/components/responses/management__NotFound'
        '409':
          $ref: '#/components/responses/management__Conflict'
      security:
        - management__ApiKeyAuth: []
      servers:
        - url: https://api.polymorfa.com
        - url: http://localhost:8080
          description: local dev
components:
  schemas:
    management__CustomerProjectRequest:
      type: object
      additionalProperties: false
      properties:
        projectId:
          allOf:
            - $ref: '#/components/schemas/management__ProjectId'
          description: |-
            Identifier of the Polymorfa project that owns this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
    management__Customer:
      type: object
      additionalProperties: false
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/management__CustomerId'
          description: |-
            Identifier for this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        orgId:
          type: string
          format: uuid
          description: |-
            Identifier for the org.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        projectId:
          allOf:
            - $ref: '#/components/schemas/management__ProjectId'
          description: |-
            Identifier of the Polymorfa project that owns this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        name:
          type: string
          nullable: true
          maxLength: 120
          description: >-
            Human-readable name for this resource.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; String length: At most `120`
            characters |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | String length | At most `120` characters |
        phone:
          type: string
          nullable: true
          pattern: ^\+[1-9][0-9]{6,14}$
          description: |-
            Phone number in international format.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string`; Pattern: `^\+[1-9][0-9]{6,14}$` |
            | Alternative 2 | `null` |

            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Pattern | `^\+[1-9][0-9]{6,14}$` |
        externalCustomerId:
          type: string
          nullable: true
          maxLength: 200
          description: >-
            Identifier for the external customer.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; String length: At most `200`
            characters |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | String length | At most `200` characters |
        status:
          type: string
          enum:
            - active
            - archiving
            - archived
          description: |-
            Current status of this resource or operation.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `active` | Active. |
            | `archiving` | Archiving. |
            | `archived` | Archived. |
        isDefault:
          type: boolean
          description: Whether default.
        archivedAt:
          type: integer
          format: int64
          nullable: true
          description: |-
            Timestamp for archived at.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `integer`; Format: `int64` |
            | Alternative 2 | `null` |

            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `int64` |
        createdAt:
          type: integer
          format: int64
          description: |-
            Unix timestamp in milliseconds when this resource was created.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `int64` |
        updatedAt:
          type: integer
          format: int64
          description: |-
            Unix timestamp in milliseconds when this resource was last updated.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `int64` |
      required:
        - id
        - orgId
        - projectId
        - name
        - phone
        - externalCustomerId
        - status
        - isDefault
        - archivedAt
        - createdAt
        - updatedAt
    management__ProjectId:
      type: string
      format: uuid
      description: >-
        Project UUID. Optional where an operation can infer or search
        organization scope; required where the operation creates a project-owned
        resource.
    management__CustomerId:
      type: string
      format: uuid
      description: Project-owned Customer UUID.
    management__ErrorEnvelope:
      type: object
      required:
        - error
        - data
        - docs
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - param
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - conflict_error
                - rate_limit_error
                - api_error
                - upstream_error
              description: |-
                Type discriminator for this object.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `invalid_request_error` | Invalid request error. |
                | `authentication_error` | Authentication error. |
                | `permission_error` | Permission error. |
                | `conflict_error` | Conflict error. |
                | `rate_limit_error` | Rate limit error. |
                | `api_error` | Api error. |
                | `upstream_error` | Upstream error. |
            code:
              type: string
              description: Stable failure code. Use this value for programmatic handling.
            message:
              type: string
              description: Safe explanation of the failure.
            param:
              type: string
              nullable: true
              description: |-
                Invalid request field, or null when no field applies.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string` |
                | Alternative 2 | `null` |
          description: Error details returned when the operation fails.
        data:
          type: string
          nullable: true
          enum:
            - null
          description: |-
            Always null for a failed request.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `null` | Null. |

            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        docs:
          type: string
          format: uri
          description: |-
            Documentation link to this failure code.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uri` |
  responses:
    management__BadRequest:
      description: A path, query, or request-body value did not pass validation.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__Unauthorized:
      description: Missing/invalid credential for this audience.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__Forbidden:
      description: Authenticated but lacks the required scope/role/audience.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__NotFound:
      description: >-
        The requested resource was not found inside the authenticated
        organization or project scope.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__Conflict:
      description: The request conflicts with the resource's current state.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
  securitySchemes:
    management__ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa server credential: a scoped pmfa_ organization key, or a
        pmfa_pt_ project token on project- and session-bound operations inside
        its exact authenticated project. Keys may be personal or service-account
        owned. Both enforce selected action scopes; organization keys can
        address team resources and every project in the organization. Listener
        and browser client credentials are rejected.

````