---
title: "Create a SAML service provider certificate (Beta)"
method: POST
path: "/v2/saml/service-providers/{samlServiceProviderId}/certificates"
tags: ["SAML"]
---

# Create a SAML service provider certificate (Beta)

`POST /v2/saml/service-providers/{samlServiceProviderId}/certificates`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/saml/service-providers/{samlServiceProviderId}/certificates`
- Auth: HTTP bearer

Create a certificate for a given SAML service provider.

**Beta**: This documentation describes a public beta feature and is subject to the [Beta features](/docs/sigma-product-releases#beta-features) disclaimer.

### Usage notes
- To perform this operation, you must use API credentials owned by a user assigned the Admin account type.
- Retrieve the `samlServiceProviderId` by calling the [/saml/service-providers](https://help.sigmacomputing.com/reference/list-saml-service-providers) endpoint.

## Path parameters

- `samlServiceProviderId` string, required

## Request body

- object
  - `purpose` 'signing' | 'encryption', required: Purpose of the certificate. Use `signing` for signing SAML requests and `encryption` for encrypting SAML responses.
  - `validForDays` number, double, required: Number of days the certificate is valid

## Response `201`

The newly created SAML service provider certificate.

- SamlCreateSamlServiceProviderCertificateResponse201: The newly created SAML service provider certificate.
  - `samlServiceProviderId` string, required: Unique identifier of the SAML service provider
  - `samlServiceProviderCertificateId` string, required: Unique identifier of the SAML service provider certificate

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
