---
title: "Creates federation relationship on SPIRE server"
method: POST
path: "/api/v1/spire/federations"
---

# Creates federation relationship on SPIRE server

`POST /api/v1/spire/federations`

Calls `spire-server federation create`

## Request body

- object
  - `federation_relationships` FederationRequest[]
    - union
      - object
        - `trust_domain` string, required
        - `bundle_endpoint_url` string, required
        - `trust_domain_bundle` Bundle
          - `trust_domain` string
          - `x509_authorities` object[]
            - `asn1` string
          - `jwt_authorities` object[]
            - `public_key` string
            - `key_id` string
            - `expires_at` integer
          - `sequence_number` integer
        - `https_spiffe` object
          - `endpoint_spiffe_id` string
      - object
        - `trust_domain` string, required
        - `bundle_endpoint_url` string, required
        - `trust_domain_bundle` Bundle
          - `trust_domain` string
          - `x509_authorities` object[]
            - `asn1` string
          - `jwt_authorities` object[]
            - `public_key` string
            - `key_id` string
            - `expires_at` integer
          - `sequence_number` integer
        - `https_web` object

## Response `200`

OK

- object
  - `results` object[]
    - `status` union
      - SpireStatusOk
        - `message` string
      - SpireStatusError
        - `code` integer
        - `message` string
    - `federation_relationship` FederationResponse
      - `trust_domain` string
      - `bundle_endpoint_url` string
      - `BundleEndpointProfile` union
        - object
          - `HttpsSpiffe` object
            - `endpoint_spiffe_id` string
        - object
          - `HttpsWeb` object

## Other responses

- `default` — Unexpected error

---

[API](https://skmtc.net/spiffe/apis/tornjak.md) · [All operations](https://skmtc.net/spiffe/apis/tornjak/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spiffe/tornjak/versions/5d58d68f79cd/schema)
