---
updatedAt: 2026-05-04T20:47:50.000Z
---

Fetch the complete documentation index at: https://developers.pismo.io/pismo-docs/llms.txt. Use this file to discover all available pages before exploring further.

# Link optional parameter to program


Link an optional parameter to a program. Some program parameters are optional and not automatically linked to a program when it is created. 

For more information, refer to [Edit program details and parameters](doc:cc-manage-program-details-and-parameters) or the [Program parameters](doc:program-parameters-reference-table) reference table.


# OpenAPI definition

````json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Platform setup - Programs",
    "description": "Endpoints to handle Programs",
    "version": "v1.0",
    "contact": {
      "name": "Pismo Support",
      "url": "https://developers.pismo.io/support/"
    },
    "license": {
      "name": "Copyright Pismo"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.pismolabs.io",
      "description": "Sandbox API server for testing"
    }
  ],
  "tags": [
    {
      "name": "Parameters",
      "description": "Manage program parameters"
    }
  ],
  "components": {
    "parameters": {
      "ProgramIdPath2": {
        "name": "program_id",
        "in": "path",
        "description": "Program ID",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        },
        "example": 12345
      }
    },
    "schemas": {
      "CreateProgramParameter": {
        "type": "object",
        "required": [
          "parameter_name"
        ],
        "properties": {
          "parameter_name": {
            "$ref": "#/components/schemas/ProgramParameterName"
          }
        }
      },
      "CreateProgramParameterResponse": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ProgramParameterID"
          },
          "parameter_name": {
            "$ref": "#/components/schemas/ProgramParameterName"
          },
          "value": {
            "$ref": "#/components/schemas/FloatParameterValue"
          },
          "valid_from": {
            "$ref": "#/components/schemas/ValidFrom"
          },
          "status": {
            "$ref": "#/components/schemas/ProgramParameterStatus"
          }
        }
      },
      "FloatParameterValue": {
        "type": "number",
        "format": "float",
        "description": "Parameter value",
        "example": 1.5
      },
      "handler.HTTPError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Bad request code",
            "example": "EOA0017"
          },
          "message": {
            "type": "string",
            "description": "Bad request response",
            "example": "Bad Request"
          }
        }
      },
      "ProgramParameterID": {
        "type": "integer",
        "format": "int64",
        "description": "Program parameter ID. An ID, specific to the program itself, that identifies the program's setting for a specific program parameter.\n\nFor example, suppose you have a program parameter named `CONTROL EXPIRATION CHANGES`, and its `id` is `15`. One program might set the value for that parameter like this:\n```json\n{\n  \"account_parameter\": false,\n  \"category\": \"PARAMETER\",\n  \"description\": \"Turn the control on and off.\",\n  \"id\": 2,\n  \"parameter_id\": 15,\n  \"name\": \"CONTROL EXPIRATION CHANGES\",\n  \"type\": \"DECIMAL\",\n  \"valid_from\": \"2020-01-01T00:00:00.000Z\",\n  \"valid_until\": \"2020-12-31T23:59:59.999Z\",\n  \"value\": 0\n}\n```\n\nAnother program might set the value for same program parameter like this:\n```json\n{\n  \"account_parameter\": false,\n  \"category\": \"PARAMETER\",\n  \"description\": \"Turn the control on and off.\",\n  \"id\": 4,\n  \"parameter_id\": 15,\n  \"name\": \"CONTROL EXPIRATION CHANGES\",\n  \"type\": \"DECIMAL\",\n  \"valid_from\": \"2020-02-04T00:00:00.000Z\",\n  \"valid_until\": \"2020-11-25T22:36:55.999Z\",\n  \"value\": 1\n}\n```\n\nIn both cases, `parameter_id` is `15` because the programs are setting the same program parameter - the one with `id` = `15`. However, the `id` value is different for each program, because it is used to identify that program's specific parameter setting.\n",
        "example": 1
      },
      "ProgramParameterName": {
        "type": "string",
        "maxLength": 50,
        "description": "Program parameter name.\n\nFor more information, refer to the [program parameters](https://developers.pismo.io/pismo-docs/docs/program-parameters-reference-table) reference table.\n",
        "example": "CONTROL EXPIRATION CHANGES"
      },
      "ProgramParameterStatus": {
        "type": "string",
        "description": "Program parameter status:\n * `ACTIVE` - Parameter is operational \n * `INACTIVE` Parameter cannot be used\n",
        "enum": [
          "ACTIVE",
          "INACTIVE"
        ],
        "example": "ACTIVE"
      },
      "ValidFrom": {
        "type": "string",
        "format": "date-time",
        "description": "Provided value start datetime. Format = yyyy-mm-ddThh:mm:ss.",
        "example": "2020-01-01T00:00:00.000Z"
      }
    },
    "responses": {
      "400BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/handler.HTTPError"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "S2SAuthentication": {
        "type": "http",
        "scheme": "bearer",
        "description": "All requests must be previoulsy authenticated."
      }
    }
  },
  "security": [
    {
      "S2SAuthentication": []
    }
  ],
  "paths": {
    "/programs/v1/programs/{program_id}/parameters": {
      "post": {
        "summary": "Link optional parameter to program",
        "description": "\nLink an optional parameter to a program. Some program parameters are optional and not automatically linked to a program when it is created. \n\nFor more information, refer to [Edit program details and parameters](https://developers.pismo.io/pismo-docs/docs/cc-manage-program-details-and-parameters) or the [Program parameters](https://developers.pismo.io/pismo-docs/docs/program-parameters-reference-table) reference table.\n",
        "operationId": "createProgramParameter",
        "tags": [
          "Parameters"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ProgramIdPath2"
          }
        ],
        "requestBody": {
          "description": "Link parameter to program request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProgramParameter"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProgramParameterResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400BadRequest"
          }
        }
      }
    }
  }
}
````