# Target

Type: Target

A publish target served by this connection

Schema: [Target](https://sourcey-ditto.pages.dev/http-api-doc/models/target.md)

- `address` (optional)
  Type: string
  
  The target address where events, commands and messages are published to.
  The following placeholders are allowed within the target address:
  
  * Thing ID: `{{ thing:id }}`
  
  * Thing Namespace: `{{ thing:namespace }}`
  
  * Thing Name: `{{ thing:name }}` (the part of the ID without the namespace)
  NOTE Use "command" alias for connections of type "hono".

- `topics` (optional)
  Type: Array<string>
  
  The topics to which this target is registered for
  
  uniqueItems: true
  
  Items:
    Type: string
    
    Contains the type of messages that are delivered to this target. You can receive
    
    * Thing events: `_/_/things/twin/events` (notification about twin change)
    
    * Live events: `_/_/things/live/events`
    
    * Live commands: `_/_/things/live/commands`
    
    * Live messages: `_/_/things/live/messages`
    
    * Policy announcements: `_/_/policies/announcements`
    
    * Connection announcements: `_/_/connections/announcements`
    
    enum: ["_/_/things/twin/events","_/_/things/live/commands","_/_/things/live/events","_/_/things/live/messages","_/_/policies/announcements","_/_/connections/announcements"]

- `qos` (optional)
  Type: integer
  
  Maximum Quality-of-Service level to request when subscribing for messages

- `authorizationContext` (optional)
  Type: Array<string>
  
  The authorization context defines all authorization subjects associated for this target
  
  uniqueItems: true
  
  Items:
    Type: string
    
    An authorization subject associated with this target
    
    Example:
    
    ```json
    [
      "ditto:myAuthorizationSubject"
    ]
    ```

- `issuedAcknowledgementLabel` (optional)
  Type: string
  
  The optional label of an acknowledgement which should automatically be issued by this target based on the technical settlement/ACK the connection channel provides.

- `payloadMapping` (optional)
  Type: Array<string>
  
  A list of payload mappings that are applied to messages sent via this target. If no payload mapping is specified the standard Ditto mapping is used as default.
  
  Items:
    Type: string
    
    References a payload mapping definition by its ID (the key of the PayloadMappingDefinition)
    
    Example:
    
    ```json
    [
      "javascript"
    ]
    ```

- `headerMapping` (optional)
  Type: object
  
  External headers computed from headers and other properties of Ditto protocol messages.