> ## Documentation Index
> Fetch the complete documentation index at: https://developer.dashsocial.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a campaign

> Creates a new campaign for a brand.



## OpenAPI

````yaml api-reference/library-openapi.json POST /brands/{brand_id}/campaigns
openapi: 3.0.2
info:
  contact:
    email: support@dashsocial.com
    name: Dash Social
    url: https://dashsocial.com
  description: Manage media, galleries, products, and more in the Dash Social platform.
  license:
    name: Commercial
    url: https://dashsocial.com/terms
  title: Dash Social Library Backend Service
  version: '1.0'
  x-logo:
    altText: Dash Social logo
    href: https://developer.dashsocial.com
    url: https://developer.dashsocial.com/assets/logo.svg
servers:
  - url: https://library-backend.dashsocial.com
security:
  - BearerAuth: []
tags:
  - description: Endpoints responsible for administrative actions.
    name: Admin
  - description: Endpoint(s) for working with affiliate links in campaigns
    name: AffiliateLinks
  - description: Endpoints responsible for managing AI alternative ads.
    name: AiAlternativeAds
  - description: Endpoints responsible for managing AI alternative media.
    name: AiAlternativeMedia
  - description: Endpoints responsible for fetching AI alternative media for a brand.
    name: BrandAiAlternativeMedia
  - description: Endpoints responsible for creating, reading, and updating campaigns.
    name: Campaign
  - description: Endpoints responsible for bulk campaigns actions for many brands.
    name: CampaignBulk
  - description: Endpoints for campaign benchmarks.
    name: CampaignBenchmarks
  - description: CRUD endpoint for comparing campaigns
    name: Campaign Comparison
  - description: Endpoints responsible for searching for competitors
    name: Competitors
  - description: Endpoints relating to content automations
    name: Content Automations
  - description: Endpoints relating to content automations across organizations
    name: Content Automations Cross Organization
  - description: Endpoints for content rights management.
    name: ContentRights
  - description: Endpoints relating to brand media content tags.
    name: BrandMediaContentTags
  - description: Endpoints relating to content tags.
    name: ContentTags
  - description: Endpoints relating to custom metrics
    name: Custom Metrics
  - description: Endpoints relating to segment clusters tags
    name: SegmentClusterTags
  - description: Endpoints relating to segment clusters tag associations
    name: SegmentClusterTagAssociations
  - description: Retrieve competitors for a channel
    name: CompetitorsSearch
  - description: Endpoints responsible for creating, reading, and updating galleries.
    name: Gallery
  - description: Public endpoints responsible for reading galleries
    name: PublicGallery
  - description: Endpoints responsible for gallery tags operations.
    name: GalleryTags
  - description: Endpoints relating to content automations.
    name: ContentContentAutomations
  - description: >-
      Endpoints responsible for starting, continuing, and reading gallery
      transfers
    name: GalleryTransfer
  - description: Endpoints to fetch Google Analytics data for brands
    name: GoogleAnalytics
  - description: Endpoints responsible for processing media (mostly superseded by v2).
    name: MediaV1
  - description: Endpoints responsible for searching for media
    name: MediaSearch
  - description: >-
      Endpoints responsible for creating, reading, updating a single piece of
      media.
    name: Single Media
  - description: Endpoints responsible for creating, reading, and updating media.
    name: Media
  - description: Endpoints responsible for query aggregated media timeseries metrics.
    name: MediaTimeseriesMetrics
  - description: Public endpoints responsible for reading media
    name: PublicMedia
  - description: Endpoints responsible for creating, reading, and updating products.
    name: Product
  - description: Public endpoints responsible for reading products.
    name: PublicProduct
  - description: >-
      Endpoints responsible for creating, reading, and updating Product
      Catalogs.
    name: Product Catalog
  - description: Endpoints responsible for creating, reading, and updating Product Feeds.
    name: Product Feed
  - description: Report generation
    name: Reports
  - description: Endpoints responsible for fetching Open Graph metadata.
    name: URL Metadata
  - description: UTM Settings, preset values and encoding/decoding of scheduler posts
    name: UTMSettings
  - description: Endpoints for video generation usage.
    name: VideoGeneration
paths:
  /brands/{brand_id}/campaigns:
    parameters:
      - description: The Dash Social assigned ID of the brand.
        in: path
        name: brand_id
        required: true
        schema:
          format: int32
          type: integer
    post:
      tags:
        - Campaign
      summary: Create a campaign
      description: Creates a new campaign for a brand.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
          description: Created
        '422':
          $ref: '#/components/responses/UNPROCESSABLE_ENTITY'
        default:
          $ref: '#/components/responses/DEFAULT_ERROR'
components:
  schemas:
    CampaignCreate:
      properties:
        benchmark_campaigns:
          default: null
          description: A list of campaign ids to benchmark the campaign against
          items:
            type: integer
          nullable: true
          type: array
        creator_filters:
          allOf:
            - $ref: '#/components/schemas/CreatorFilters'
          description: Filters to apply on the included creators
        creator_ids:
          default: null
          description: List of creator IDs to add to the campaign.
          items:
            type: integer
          nullable: true
          type: array
        end_date:
          default: null
          description: A formatted datetime string in UTC.
          example: '2019-12-12'
          nullable: true
          pattern: ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(Z|((\+|-)\d{2}:\d{2})))?$
          type: string
        google_analytics_selected_campaigns:
          default: null
          description: A list of the selected google analytics campaigns.
          items:
            type: string
          nullable: true
          type: array
        hashtag_ids:
          default: null
          description: A list of hashtags added to the campaign.
          items:
            type: integer
          nullable: true
          type: array
        name:
          description: Name of the campaign.
          maxLength: 64
          minLength: 1
          type: string
        start_date:
          default: null
          description: A formatted datetime string in UTC.
          example: '2019-12-01'
          nullable: true
          pattern: ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(Z|((\+|-)\d{2}:\d{2})))?$
          type: string
        topline_metrics:
          allOf:
            - $ref: '#/components/schemas/TopLineMetrics'
          default: null
          description: Custom top line metrics and goals for the campaign
          nullable: true
        ttcm_spark_ads_authorization_days:
          description: Duration in which `ttcm_orders_invite_link` is valid (in days)
          type: integer
      required:
        - name
      type: object
    Campaign:
      properties:
        ad_campaigns:
          items:
            $ref: '#/components/schemas/CampaignAdCampaign'
          type: array
        avg_emv:
          description: >-
            Sum of EMV across supported channels divided by number of posts with
            EMV values 
          type: number
        avg_engagement_rate:
          description: >-
            Sum of average engagement per media across supported channels
            divided by number of posts with avg engagement rate values 
          type: number
        avg_engagements:
          description: >-
            Sum of engagements across supported channels divided by number of
            posts
          type: number
        benchmark_campaigns:
          description: A list of campaign objects to benchmark the campaign against
          readOnly: true
        brand_id:
          type: integer
        created_at:
          format: date-time
          type: string
        creator_filters:
          $ref: '#/components/schemas/CreatorFilters'
        creator_ids:
          items:
            type: integer
          type: array
        earliest_media_published_date:
          format: date-time
          type: string
        end_date:
          format: date-time
          type: string
        google_analytics_selected_campaigns:
          items:
            type: string
          type: array
        has_relationships:
          type: boolean
        has_ugc:
          type: boolean
        hashtags:
          nullable: true
        id:
          type: integer
        included_ad_sources:
          nullable: true
        included_creator_sources:
          description: A list of creator channels
          readOnly: true
        included_media_sources:
          items:
            type: string
          type: array
        latest_media_published_date:
          format: date-time
          type: string
        name:
          type: string
        number_of_media:
          type: integer
        show_v1_facebook_metrics:
          type: boolean
        show_v1_instagram_metrics:
          type: boolean
        show_v2_facebook_metrics:
          type: boolean
        show_v2_instagram_metrics:
          type: boolean
        start_date:
          format: date-time
          type: string
        top_media: {}
        topline_metrics:
          allOf:
            - $ref: '#/components/schemas/TopLineMetrics'
          description: Custom top line metrics and goals for the campaign
        total_clicks:
          description: Sum of clicks across supported channels
          type: integer
        total_creator_likes:
          description: Sum of creator likes across supported channels
          type: integer
        total_emv:
          description: Sum of EMV across supported channels
          type: integer
        total_engagements:
          description: Sum of engagements across all channels
          type: integer
        total_impressions:
          description: Sum of impressions across supported channels
          type: integer
        total_video_views:
          description: Sum of video views across supported channels
          type: integer
        ttcm_orders_campaign_code:
          maxLength: 256
          nullable: true
          type: string
        ttcm_orders_invite_link:
          description: URL for inviting creators to a TikTok campaign
          format: url
          type: string
        ttcm_spark_ads_authorization_days:
          description: Duration in which `ttcm_orders_invite_link` is valid (in days)
          type: integer
        updated_at:
          format: date-time
          type: string
      required:
        - brand_id
      type: object
    CreatorFilters:
      properties:
        excluded_media_ids:
          default: []
          items:
            type: integer
          type: array
        included_media_ids:
          default: []
          items:
            type: integer
          type: array
        source_created_at:
          allOf:
            - $ref: '#/components/schemas/DateTimeRange'
          default: null
          nullable: true
      type: object
    TopLineMetrics:
      additionalProperties: false
      properties:
        CREATOR_SUMMARY:
          description: Top line metrics for creator summary
          items:
            $ref: '#/components/schemas/CreatorSummaryMetricItem'
          nullable: true
          type: array
        OWNED_SUMMARY:
          description: Top line metrics for owned summary
          items:
            $ref: '#/components/schemas/OwnedSummaryMetricItem'
          nullable: true
          type: array
        SOCIAL_ADS_SUMMARY:
          description: Top line metrics for social ads summary
          items:
            $ref: '#/components/schemas/SocialAdsSummaryMetricItem'
          nullable: true
          type: array
      type: object
    CampaignAdCampaign:
      properties:
        source:
          enum:
            - META_ADS
            - TIKTOK_ADS
          type: string
        source_ad_account_id:
          type: string
        source_campaign_id:
          type: string
      required:
        - source
        - source_ad_account_id
        - source_campaign_id
      type: object
    Error:
      properties:
        code:
          description: Error code
          type: integer
        errors:
          description: Errors
          type: object
        message:
          description: Error message
          type: string
        status:
          description: Error name
          type: string
      type: object
    DateTimeRange:
      properties:
        end:
          type: string
        start:
          type: string
      required:
        - end
        - start
      type: object
    CreatorSummaryMetricItem:
      properties:
        goal:
          default: null
          description: The goal value for this metric
          nullable: true
          type: number
        metric:
          description: >-
            The metric name. Must be one of total_posts, emv_views,
            avg_emv_views, likes, comments, avg_engagements, avg_engagement_rate
          enum:
            - total_posts
            - emv_views
            - avg_emv_views
            - likes
            - comments
            - avg_engagements
            - avg_engagement_rate
          type: string
        source:
          description: The source of the metric data. Must be one of creator_insights
          enum:
            - creator_insights
          type: string
      required:
        - metric
        - source
      type: object
    OwnedSummaryMetricItem:
      properties:
        aggregation:
          description: >-
            The aggregation method for custom metrics (required for
            custom_metrics source)
          enum:
            - SUM
            - AVERAGE
          type: string
        goal:
          default: null
          description: The goal value for this metric
          nullable: true
          type: number
        id:
          description: The ID of the metric. Required for custom metrics.
          type: integer
        metric:
          description: The name of the metric. Required for non-custom metrics.
          type: string
        source:
          description: >-
            The source of the metric data. Must be one of campaign_stats,
            custom_metrics
          enum:
            - campaign_stats
            - custom_metrics
          type: string
      required:
        - source
      type: object
    SocialAdsSummaryMetricItem:
      properties:
        goal:
          default: null
          description: The goal value for this metric
          nullable: true
          type: number
        metric:
          description: >-
            The metric name. Must be one of TOTAL_SPENT, AVG_COST_PER_CLICK,
            AVG_COST_PER_MILE, CLICKS_ALL_ADS, IMPRESSIONS_ADS, CLICKS_ADS
          enum:
            - TOTAL_SPENT
            - AVG_COST_PER_CLICK
            - AVG_COST_PER_MILE
            - CLICKS_ALL_ADS
            - IMPRESSIONS_ADS
            - CLICKS_ADS
          type: string
        source:
          description: The source of the metric data. Must be one of dashboards
          enum:
            - dashboards
          type: string
      required:
        - metric
        - source
      type: object
  responses:
    UNPROCESSABLE_ENTITY:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Unprocessable Entity
    DEFAULT_ERROR:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Default error response
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key from Dash Social developer settings

````