Create an application

POST /api/applications

Create a new application with the given data.

application/json

Body Required

Responses

POST /api/applications
curl \
 -X POST https://[tenant_id].logto.app/api/applications \
 -H "Content-Type: application/json" \
 -d '{"name":"string","description":"string","type":"Native","oidcClientMetadata":{"redirectUris":[{}],"postLogoutRedirectUris":["string"],"logoUri":"string"},"customClientMetadata":{"corsAllowedOrigins":["string"],"idTokenTtl":42.0,"refreshTokenTtl":42.0,"refreshTokenTtlInDays":42.0,"alwaysIssueRefreshToken":true,"rotateRefreshToken":true},"isThirdParty":true,"protectedAppMetadata":{"subDomain":"string","origin":"string"}}'
Request example
{
  "name": "string",
  "description": "string",
  "type": "Native",
  "oidcClientMetadata": {
    "redirectUris": [
      {}
    ],
    "postLogoutRedirectUris": [
      "string"
    ],
    "logoUri": "string"
  },
  "customClientMetadata": {
    "corsAllowedOrigins": [
      "string"
    ],
    "idTokenTtl": 42.0,
    "refreshTokenTtl": 42.0,
    "refreshTokenTtlInDays": 42.0,
    "alwaysIssueRefreshToken": true,
    "rotateRefreshToken": true
  },
  "isThirdParty": true,
  "protectedAppMetadata": {
    "subDomain": "string",
    "origin": "string"
  }
}
Response examples (200)
{
  "id": "string",
  "name": "string",
  "secret": "string",
  "description": "string",
  "type": "Native",
  "oidcClientMetadata": {
    "redirectUris": [
      {}
    ],
    "postLogoutRedirectUris": [
      "string"
    ],
    "logoUri": "string"
  },
  "customClientMetadata": {
    "corsAllowedOrigins": [
      "string"
    ],
    "idTokenTtl": 42.0,
    "refreshTokenTtl": 42.0,
    "refreshTokenTtlInDays": 42.0,
    "alwaysIssueRefreshToken": true,
    "rotateRefreshToken": true
  },
  "protectedAppMetadata": {
    "host": "string",
    "origin": "string",
    "sessionDuration": 42.0,
    "pageRules": [
      {
        "path": "string"
      }
    ],
    "customDomains": [
      {
        "domain": "string",
        "status": "PendingVerification",
        "errorMessage": "string",
        "dnsRecords": [
          {
            "name": "string",
            "type": "string",
            "value": "string"
          }
        ],
        "cloudflareData": {
          "id": "string",
          "status": "string",
          "ssl": {
            "status": "string",
            "validation_errors": [
              {
                "message": "string"
              }
            ]
          },
          "verification_errors": [
            "string"
          ]
        }
      }
    ]
  },
  "isThirdParty": true,
  "createdAt": 42.0
}