# Update Referral Program

Updates a referral program, also without referral program access; omitted settings stay, the counter field cannot change. A new threshold applies to the next successful recommendation; contacts already tagged keep their tag.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "ID of the program, from search-referral-programs or create-referral-program",
      "minimum": 1
    },
    "name": {
      "type": [
        "null",
        "string"
      ],
      "description": "New name of the program",
      "default": null,
      "minLength": 1,
      "maxLength": 250
    },
    "targetUrl": {
      "type": [
        "null",
        "string"
      ],
      "description": "Absolute URL of the page a recommended person is sent to",
      "default": null,
      "minLength": 1,
      "maxLength": 2000
    },
    "threshold": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Successful recommendations a contact needs before the program tags them",
      "default": null,
      "minimum": 1,
      "maximum": 1000000000
    },
    "metaLabels": {
      "type": "array",
      "description": "Labels of the program; replaces the current ones",
      "default": null,
      "items": {
        "type": "string",
        "maxLength": 250
      }
    },
    "notes": {
      "type": [
        "null",
        "string"
      ],
      "description": "Internal note",
      "default": null,
      "maxLength": 1000
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "id",
    "name",
    "notes",
    "metaLabels",
    "targetUrl",
    "threshold",
    "counterCustomFieldId",
    "editUrl"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    },
    "metaLabels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "targetUrl": {
      "type": "string"
    },
    "threshold": {
      "type": "integer"
    },
    "counterCustomFieldId": {
      "type": "string"
    },
    "editUrl": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
```

