Sponsors

Update sponsor content

Update selected public-facing content for one sponsor in an authorized event. List the event's sponsors first, show the exact before and after values, and invoke this operation only after the user approves those fields. Only supplied fields change. Send an Idempotency-Key header.

Method

PATCH

Path

/v1/sponsors/{sponsorId}

Required scope

sponsors:write

Request

curl -X PATCH "https://api.endurancehq.app/v1/sponsors/{sponsorId}" \
  -H "Authorization: Bearer $EHQ_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Path parameters

sponsorIdstring, required

JSON body schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "logoUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "logoUrlDark": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "logoMarkUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "websiteUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "videoUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000,
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20000
        },
        {
          "type": "null"
        }
      ]
    },
    "profileMedia": {
      "maxItems": 8,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "imageUrl": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          },
          "altText": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "caption": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 600
              },
              {
                "type": "null"
              }
            ]
          },
          "ctaLabel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "ctaUrl": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "imageUrl"
        ],
        "additionalProperties": false
      }
    },
    "socials": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "maxLength": 40
          },
          "additionalProperties": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "brandPrimaryColor": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "brandAccentColor": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false
}

Response

Success status: 200

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "eventId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "level": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": [
            "string",
            "null"
          ]
        },
        "logoUrl": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "logoUrlDark": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "logoMarkUrl": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "websiteUrl": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "videoUrl": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "profileMedia": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "imageUrl": {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              "altText": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "caption": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 600
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ctaLabel": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 80
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ctaUrl": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "imageUrl"
            ],
            "additionalProperties": false
          }
        },
        "socials": {
          "anyOf": [
            {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "maxLength": 40
              },
              "additionalProperties": {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "brandPrimaryColor": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "brandAccentColor": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^#[0-9a-fA-F]{6}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "id",
        "eventId",
        "name",
        "level",
        "status",
        "logoUrl",
        "logoUrlDark",
        "logoMarkUrl",
        "websiteUrl",
        "videoUrl",
        "description",
        "profileMedia",
        "socials",
        "brandPrimaryColor",
        "brandAccentColor",
        "updatedAt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

CLI: ehq sponsors update <sponsor_id> --description <text> [--website-url <url>]

MCP tool: ehq_sponsors_update