> For the complete documentation index, see [llms.txt](https://docs.appetize.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appetize.io/rest-api/identity-providers.md).

# Identity Providers

## GET /v2/identity-providers

> List all identity providers

```json
{"openapi":"3.0.3","info":{"title":"Appetize V2 API Reference","version":"2"},"servers":[{"url":"https://api.appetize.io"}],"security":[{"jwt":[]},{"apiToken":[]}],"components":{"securitySchemes":{"apiToken":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Use an API token for authentication via X-API-KEY header"}},"schemas":{"Pagination":{"type":"object","properties":{"total":{"type":"integer","format":"int32"},"nextPage":{"type":"number","nullable":true,"format":"int32"}}},"IdentityProviderList":{"type":"object","properties":{"providers":{"type":"array","items":{"$ref":"#/components/schemas/IdentityProvider"}}}},"IdentityProvider":{"type":"object","required":["id","key","type","config","created","createdBy"],"properties":{"id":{"type":"string","description":"The unique identifier for the Identity Provider"},"key":{"type":"string","description":"URL-safe, human-readable identifier"},"type":{"type":"string","enum":["saml","oidc"]},"config":{"type":"object","oneOf":[{"$ref":"#/components/schemas/SamlConfigResponse"},{"$ref":"#/components/schemas/OidcConfig"}]},"created":{"type":"string","format":"date-time","description":"Timestamp when the provider was created"},"createdBy":{"type":"string","description":"Username or token label that created the provider"},"updated":{"type":"string","format":"date-time","description":"Timestamp of the last update"},"updatedBy":{"type":"string","description":"Username or token label that last modified the provider"}}},"SamlConfigResponse":{"allOf":[{"$ref":"#/components/schemas/SamlConfigRequest"},{"type":"object","properties":{"certExpires":{"type":"string","format":"date-time","readOnly":true},"cbUrl":{"type":"string","description":"Legacy callback URL for migrated SAML providers (also used for IdP-initiated login)","readOnly":true}}}]},"SamlConfigRequest":{"type":"object","required":["entryPoint","issuer","cert"],"properties":{"entryPoint":{"type":"string","format":"uri","description":"Login URL where authentication requests are sent"},"issuer":{"type":"string","description":"Unique identifier for the application identity provider"},"cert":{"type":"string","description":"X.509 public certificate used to verify SAML assertions"}}},"OidcConfig":{"type":"object","required":["discoverUrl","clientId","clientSecret"],"properties":{"discoverUrl":{"type":"string","format":"uri","description":"The base URL of the OIDC provider. This should point to the discovery document root (e.g., https://accounts.example.com)."},"clientId":{"type":"string","description":"The client identifier registered with the OIDC provider."},"clientSecret":{"type":"string","description":"The client secret issued by the OIDC provider."},"scope":{"type":"string","description":"Space-separated list of scopes to request during the authorization flow."},"nonce":{"type":"string","description":"Optional nonce value to include in the authorization request."},"cbUrl":{"type":"string","description":"Legacy callback URL for migrated OIDC providers","readOnly":true}}},"Error":{"type":"object","properties":{"message":{"description":"Error message.","type":"string"}}}}},"paths":{"/v2/identity-providers":{"get":{"summary":"List all identity providers","tags":["Identity Providers"],"operationId":"listIdentityProviders","parameters":[{"in":"query","name":"page","description":"The page number of results","schema":{"type":"integer"}},{"in":"query","name":"limit","description":"The number of results to return per page","schema":{"type":"integer"}}],"responses":{"200":{"description":"A list of configured identity providers","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Pagination"},{"$ref":"#/components/schemas/IdentityProviderList"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /v2/identity-providers

> Create a new identity provider

```json
{"openapi":"3.0.3","info":{"title":"Appetize V2 API Reference","version":"2"},"servers":[{"url":"https://api.appetize.io"}],"security":[{"jwt":[]},{"apiToken":[]}],"components":{"securitySchemes":{"apiToken":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Use an API token for authentication via X-API-KEY header"}},"schemas":{"IdentityProviderCreate":{"type":"object","required":["type","config"],"properties":{"type":{"type":"string","enum":["saml","oidc"]},"config":{"type":"object","oneOf":[{"$ref":"#/components/schemas/SamlConfigRequest"},{"$ref":"#/components/schemas/OidcConfig"}]}}},"SamlConfigRequest":{"type":"object","required":["entryPoint","issuer","cert"],"properties":{"entryPoint":{"type":"string","format":"uri","description":"Login URL where authentication requests are sent"},"issuer":{"type":"string","description":"Unique identifier for the application identity provider"},"cert":{"type":"string","description":"X.509 public certificate used to verify SAML assertions"}}},"OidcConfig":{"type":"object","required":["discoverUrl","clientId","clientSecret"],"properties":{"discoverUrl":{"type":"string","format":"uri","description":"The base URL of the OIDC provider. This should point to the discovery document root (e.g., https://accounts.example.com)."},"clientId":{"type":"string","description":"The client identifier registered with the OIDC provider."},"clientSecret":{"type":"string","description":"The client secret issued by the OIDC provider."},"scope":{"type":"string","description":"Space-separated list of scopes to request during the authorization flow."},"nonce":{"type":"string","description":"Optional nonce value to include in the authorization request."},"cbUrl":{"type":"string","description":"Legacy callback URL for migrated OIDC providers","readOnly":true}}},"IdentityProvider":{"type":"object","required":["id","key","type","config","created","createdBy"],"properties":{"id":{"type":"string","description":"The unique identifier for the Identity Provider"},"key":{"type":"string","description":"URL-safe, human-readable identifier"},"type":{"type":"string","enum":["saml","oidc"]},"config":{"type":"object","oneOf":[{"$ref":"#/components/schemas/SamlConfigResponse"},{"$ref":"#/components/schemas/OidcConfig"}]},"created":{"type":"string","format":"date-time","description":"Timestamp when the provider was created"},"createdBy":{"type":"string","description":"Username or token label that created the provider"},"updated":{"type":"string","format":"date-time","description":"Timestamp of the last update"},"updatedBy":{"type":"string","description":"Username or token label that last modified the provider"}}},"SamlConfigResponse":{"allOf":[{"$ref":"#/components/schemas/SamlConfigRequest"},{"type":"object","properties":{"certExpires":{"type":"string","format":"date-time","readOnly":true},"cbUrl":{"type":"string","description":"Legacy callback URL for migrated SAML providers (also used for IdP-initiated login)","readOnly":true}}}]},"Error":{"type":"object","properties":{"message":{"description":"Error message.","type":"string"}}}}},"paths":{"/v2/identity-providers":{"post":{"summary":"Create a new identity provider","tags":["Identity Providers"],"operationId":"createIdentityProvider","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProviderCreate"}}}},"responses":{"201":{"description":"Created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProvider"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /v2/identity-providers/{idpId}

> Get an identity provider by ID

```json
{"openapi":"3.0.3","info":{"title":"Appetize V2 API Reference","version":"2"},"servers":[{"url":"https://api.appetize.io"}],"security":[{"jwt":[]},{"apiToken":[]}],"components":{"securitySchemes":{"apiToken":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Use an API token for authentication via X-API-KEY header"}},"parameters":{"idpId":{"name":"idpId","in":"path","required":true,"schema":{"type":"string"}}},"schemas":{"IdentityProvider":{"type":"object","required":["id","key","type","config","created","createdBy"],"properties":{"id":{"type":"string","description":"The unique identifier for the Identity Provider"},"key":{"type":"string","description":"URL-safe, human-readable identifier"},"type":{"type":"string","enum":["saml","oidc"]},"config":{"type":"object","oneOf":[{"$ref":"#/components/schemas/SamlConfigResponse"},{"$ref":"#/components/schemas/OidcConfig"}]},"created":{"type":"string","format":"date-time","description":"Timestamp when the provider was created"},"createdBy":{"type":"string","description":"Username or token label that created the provider"},"updated":{"type":"string","format":"date-time","description":"Timestamp of the last update"},"updatedBy":{"type":"string","description":"Username or token label that last modified the provider"}}},"SamlConfigResponse":{"allOf":[{"$ref":"#/components/schemas/SamlConfigRequest"},{"type":"object","properties":{"certExpires":{"type":"string","format":"date-time","readOnly":true},"cbUrl":{"type":"string","description":"Legacy callback URL for migrated SAML providers (also used for IdP-initiated login)","readOnly":true}}}]},"SamlConfigRequest":{"type":"object","required":["entryPoint","issuer","cert"],"properties":{"entryPoint":{"type":"string","format":"uri","description":"Login URL where authentication requests are sent"},"issuer":{"type":"string","description":"Unique identifier for the application identity provider"},"cert":{"type":"string","description":"X.509 public certificate used to verify SAML assertions"}}},"OidcConfig":{"type":"object","required":["discoverUrl","clientId","clientSecret"],"properties":{"discoverUrl":{"type":"string","format":"uri","description":"The base URL of the OIDC provider. This should point to the discovery document root (e.g., https://accounts.example.com)."},"clientId":{"type":"string","description":"The client identifier registered with the OIDC provider."},"clientSecret":{"type":"string","description":"The client secret issued by the OIDC provider."},"scope":{"type":"string","description":"Space-separated list of scopes to request during the authorization flow."},"nonce":{"type":"string","description":"Optional nonce value to include in the authorization request."},"cbUrl":{"type":"string","description":"Legacy callback URL for migrated OIDC providers","readOnly":true}}},"Error":{"type":"object","properties":{"message":{"description":"Error message.","type":"string"}}}}},"paths":{"/v2/identity-providers/{idpId}":{"get":{"summary":"Get an identity provider by ID","tags":["Identity Providers"],"operationId":"getIdentityProvider","parameters":[{"$ref":"#/components/parameters/idpId"}],"responses":{"200":{"description":"Identity provider config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProvider"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## DELETE /v2/identity-providers/{idpId}

> Delete an identity provider by ID

```json
{"openapi":"3.0.3","info":{"title":"Appetize V2 API Reference","version":"2"},"servers":[{"url":"https://api.appetize.io"}],"security":[{"jwt":[]},{"apiToken":[]}],"components":{"securitySchemes":{"apiToken":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Use an API token for authentication via X-API-KEY header"}},"parameters":{"idpId":{"name":"idpId","in":"path","required":true,"schema":{"type":"string"}}},"schemas":{"Error":{"type":"object","properties":{"message":{"description":"Error message.","type":"string"}}}}},"paths":{"/v2/identity-providers/{idpId}":{"delete":{"summary":"Delete an identity provider by ID","tags":["Identity Providers"],"operationId":"deleteIdentityProvider","parameters":[{"$ref":"#/components/parameters/idpId"}],"responses":{"204":{"description":"Deleted successfully"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## PATCH /v2/identity-providers/{idpId}

> Update an existing identity provider

```json
{"openapi":"3.0.3","info":{"title":"Appetize V2 API Reference","version":"2"},"servers":[{"url":"https://api.appetize.io"}],"security":[{"jwt":[]},{"apiToken":[]}],"components":{"securitySchemes":{"apiToken":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Use an API token for authentication via X-API-KEY header"}},"parameters":{"idpId":{"name":"idpId","in":"path","required":true,"schema":{"type":"string"}}},"schemas":{"IdentityProviderUpdate":{"type":"object","required":["config"],"properties":{"config":{"type":"object","oneOf":[{"$ref":"#/components/schemas/SamlConfigRequest"},{"$ref":"#/components/schemas/OidcConfig"}]}}},"SamlConfigRequest":{"type":"object","required":["entryPoint","issuer","cert"],"properties":{"entryPoint":{"type":"string","format":"uri","description":"Login URL where authentication requests are sent"},"issuer":{"type":"string","description":"Unique identifier for the application identity provider"},"cert":{"type":"string","description":"X.509 public certificate used to verify SAML assertions"}}},"OidcConfig":{"type":"object","required":["discoverUrl","clientId","clientSecret"],"properties":{"discoverUrl":{"type":"string","format":"uri","description":"The base URL of the OIDC provider. This should point to the discovery document root (e.g., https://accounts.example.com)."},"clientId":{"type":"string","description":"The client identifier registered with the OIDC provider."},"clientSecret":{"type":"string","description":"The client secret issued by the OIDC provider."},"scope":{"type":"string","description":"Space-separated list of scopes to request during the authorization flow."},"nonce":{"type":"string","description":"Optional nonce value to include in the authorization request."},"cbUrl":{"type":"string","description":"Legacy callback URL for migrated OIDC providers","readOnly":true}}},"IdentityProvider":{"type":"object","required":["id","key","type","config","created","createdBy"],"properties":{"id":{"type":"string","description":"The unique identifier for the Identity Provider"},"key":{"type":"string","description":"URL-safe, human-readable identifier"},"type":{"type":"string","enum":["saml","oidc"]},"config":{"type":"object","oneOf":[{"$ref":"#/components/schemas/SamlConfigResponse"},{"$ref":"#/components/schemas/OidcConfig"}]},"created":{"type":"string","format":"date-time","description":"Timestamp when the provider was created"},"createdBy":{"type":"string","description":"Username or token label that created the provider"},"updated":{"type":"string","format":"date-time","description":"Timestamp of the last update"},"updatedBy":{"type":"string","description":"Username or token label that last modified the provider"}}},"SamlConfigResponse":{"allOf":[{"$ref":"#/components/schemas/SamlConfigRequest"},{"type":"object","properties":{"certExpires":{"type":"string","format":"date-time","readOnly":true},"cbUrl":{"type":"string","description":"Legacy callback URL for migrated SAML providers (also used for IdP-initiated login)","readOnly":true}}}]},"Error":{"type":"object","properties":{"message":{"description":"Error message.","type":"string"}}}}},"paths":{"/v2/identity-providers/{idpId}":{"patch":{"summary":"Update an existing identity provider","tags":["Identity Providers"],"operationId":"updateIdentityProvider","parameters":[{"$ref":"#/components/parameters/idpId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProviderUpdate"}}}},"responses":{"200":{"description":"Updated provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProvider"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
