# [BETA] Call a signal endpoint. POST https://app.unleash-instance.example.com/api/signal-endpoint/{name} **Enterprise feature** **[BETA]** This API is in beta state, which means it may change or be removed in the future. Calls a configured signal endpoint, registering a signal. Reference: https://docs.getunleash.io/api/call-signal-endpoint ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: admin-api version: 1.0.0 paths: /api/signal-endpoint/{name}: post: operationId: call-signal-endpoint summary: '[BETA] Call a signal endpoint.' description: >- **Enterprise feature** **[BETA]** This API is in beta state, which means it may change or be removed in the future. Calls a configured signal endpoint, registering a signal. tags: - subpackage_operational parameters: - name: name in: path required: true schema: type: string - name: Authorization in: header description: API key needed to access this API required: true schema: type: string responses: '200': description: '#/components/schemas/signalsSchema' content: application/json: schema: $ref: '#/components/schemas/signalsSchema' '401': description: >- Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`. content: application/json: schema: $ref: >- #/components/schemas/CallSignalEndpointRequestUnauthorizedError servers: - url: https://app.unleash-instance.example.com components: schemas: SignalSchemaPayload: type: object properties: {} description: The payload of the signal. title: SignalSchemaPayload SignalSchemaSource: type: string enum: - signal-endpoint description: >- The signal source type. Should be used along with `sourceId` to uniquely identify the resource that created this signal. title: SignalSchemaSource signalSchema: type: object properties: id: type: integer description: >- The signal's ID. Signal IDs are incrementing integers. In other words, a more recently created signal will always have a higher ID than an older one. payload: $ref: '#/components/schemas/SignalSchemaPayload' description: The payload of the signal. createdAt: type: string format: date-time description: The date and time of when the signal was created. source: $ref: '#/components/schemas/SignalSchemaSource' description: >- The signal source type. Should be used along with `sourceId` to uniquely identify the resource that created this signal. sourceId: type: integer description: >- The ID of the source that created this signal. Should be used along with `source` to uniquely identify the resource that created this signal. createdBySourceTokenId: type: - integer - 'null' description: >- The ID of the source token that created this signal. Only present if the signal was created by a signal endpoint. required: - id - createdAt - source - sourceId description: An object describing a signal. title: signalSchema signalsSchema: type: object properties: signals: type: array items: $ref: '#/components/schemas/signalSchema' description: A list of signals. required: - signals description: A response model with a list of signals. title: signalsSchema CallSignalEndpointRequestUnauthorizedError: type: object properties: id: type: string description: The ID of the error instance name: type: string description: The name of the error kind message: type: string description: A description of what went wrong. title: CallSignalEndpointRequestUnauthorizedError securitySchemes: apiKey: type: apiKey in: header name: Authorization description: API key needed to access this API bearerToken: type: http scheme: bearer description: API key needed to access this API, in Bearer token format ``` ## SDK Code Examples ```python import requests url = "https://app.unleash-instance.example.com/api/signal-endpoint/name" headers = {"Authorization": ""} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/signal-endpoint/name'; const options = {method: 'POST', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/signal-endpoint/name" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/api/signal-endpoint/name") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://app.unleash-instance.example.com/api/signal-endpoint/name") .header("Authorization", "") .asString(); ``` ```php request('POST', 'https://app.unleash-instance.example.com/api/signal-endpoint/name', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/signal-endpoint/name"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/signal-endpoint/name")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```