# Upsert organization scheduled actions config

`PUT /organizations/{organizationId}/configs/scheduled-actions`



[Auth Administration API guide](https://docs.contextual.io/legacy/tenants/tenant-apis/auth-administration-api.md)

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Contextual Auth API",
    "description": " "
  },
  "security": [
    {
      "jwt": []
    }
  ],
  "servers": [
    {
      "url": "https://auth.{tenantId}.my.contextual.io/api/v1",
      "variables": {
        "tenantId": {
          "default": "YOUR-TENANT-ID"
        }
      }
    }
  ],
  "paths": {
    "/organizations/{organizationId}/configs/scheduled-actions": {
      "put": {
        "tags": [
          "Organization configs"
        ],
        "summary": "Upsert organization scheduled actions config",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "const": "scheduled-actions"
                  },
                  "auth": {
                    "type": "object",
                    "properties": {
                      "authEndpoint": {
                        "type": "string"
                      },
                      "audience": {
                        "type": "string"
                      },
                      "clientId": {
                        "type": "string"
                      },
                      "clientSecret": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "authEndpoint",
                      "clientId",
                      "clientSecret"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "auth"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "const": "scheduled-actions"
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "authEndpoint": {
                          "type": "string"
                        },
                        "audience": {
                          "type": "string"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "clientSecret": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "authEndpoint",
                        "clientId",
                        "clientSecret"
                      ],
                      "additionalProperties": false
                    },
                    "_metaData": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                          "description": "An ISO 8601 date time string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "id",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "auth",
                    "_metaData"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "$ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "number"
            ]
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      }
    }
  }
}
```