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

# Duplicate a Drip Campaign



## OpenAPI

````yaml api-reference/generated.yaml post /v1/accounts/{accountId}/dripcampaigns/{dripCampaignId}/duplicate
openapi: 3.1.0
info:
  description: >
    # Introduction


    Welcome to the documentation for the Sakari Messaging REST API. 


    Sakari provides an advanced platform to drive large scale customized SMS
    communication


    REST is a web-service protocol that lends itself to rapid development by
    using everyday HTTP and JSON technology.


    To find out more about our product offering, please visit
    [https://sakari.io](https://sakari.io).


    # Quickstart


    For your convenience we have created a quickstart guide to get you up and
    running in 5 minutes. 


    [https://sakari.io/blog/text-messaging-sms-api-quickstart/](https://sakari.io/blog/text-messaging-sms-api-quickstart/)


    # PostMan Collection


    We've created a simple set of examples using
    [PostMan](https://www.getpostman.com/) Simply click below to import these.
    You will need to setup three environment variables in PostMan - AccountId,
    ClientId and ClientSecret. Check out our PostMan blog post for more
    information


    [![Run in
    Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/d616e273edc916a7a6eb)


    # Finding your client id, client secret and account id


    To authenticate against the API's you will need three key pieces of data
     - client id
     - client secret
     - account id

    To retrieve these, simply login into
    [https://hub.sakari.io](https://hub.sakari.io) and click on the "cog" in the
    top right corner. In the popup dialog at the bottom you should see your API
    credentials and account id. If these are not visible you will need to click
    on "Request Credentials"


    # Versioning


    With any breaking changes we will introduce a new version of the API. The
    latest version is v1.


    The API uses an open schema model, which means server may add extra
    properties to responses. Likewise, the server will ignore any extra query
    parameters and request body properties. When you write clients, you need to
    ignore additional properties in responses to ensure they do not break.


    # Testing


    There are numerous tools available for testing the API's. We will include
    examples using curl and the client SDKs that we have created. If you would
    like to see an SDK in a language not currently available, please let us
    know.


    # Throttling / Limits


    Our API's have been specifically designed to support bulk messaging in a
    single API call. We therefore impose limits on the frequency of calling the
    APIs to prevent abuse or runaway processes. If you feel you need a higher
    limit, please contact us. If you hit the limit you will get a 429 error code
    returned from our servers


    # Errors


    The API uses standard HTTP status codes to indicate the success or failure
    of the API call. The body of the response will be JSON in the following
    format:


    ```

    {
      "success": false,
      "error": {
        "code": "CONT-001",
        "message": "Invalid mobile number"
      }
    }

    ```


    # Pagination


    For performance, most GET calls return a subset of data. This data is
    paginated for easy access. Most APIs which return collections of data will
    return a pagination object as such:


    ```

    {
      "pagination": {
        "offset": 0,
        "limit": 10
      }  
    }

    ```


    When making calls to the API, you can adjust the slice of data returned
    using query parameters such as:


    `` https://api.sakari.io/v1/accounts/123/contacts?offset=20&limit=25 ``


    This will return 25 contacts with an offset of 20.
  version: 1.0.2
  title: Sakari
  termsOfService: https://sakari.io/terms-service.html
  contact:
    email: help@sakari.io
servers:
  - description: Sakari Production
    url: https://api.sakari.io
security: []
tags:
  - name: authentication
    description: >
      Sakari uses OAuth2 for authentication. After you have created an account
      at [https://hub.sakari.io](https://hub.sakari.io), you can retrieve your
      client id and secret from the 'Account Details' screen (click on the 'cog'
      icon in the top right corner and scroll down to API Credentials)


      Using your client id and secret, you can exchange these for a JWT ([JSON
      Web Token](https://en.wikipedia.org/wiki/JSON_Web_Token))


      The JWT should then be used when accessing any of the core API's. It
      should be passed in the `Authorization` header.


      For example:


      ``Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImt....``
  - name: accounts
    description: Create, modify or delete accounts
  - name: contacts
    description: Create, modify or delete contacts
  - name: integrations
    description: View existing integrations in your Sakari account
  - name: autoresponders
    description: Create, modify, or delete autoresponders
  - name: availablephonenumbers
    description: Check for available phone numbers
  - name: bulk
    description: Bulk actions for contacts and users
  - name: messages
    description: >-
      Send or track messages to one contact, a group of contacts or your entire
      address book
  - name: templates
    description: Define reusable message or web templates
  - name: campaigns
    description: >-
      Define reusable message campaigns with a predefined contact list/filter,
      template and schedule
  - name: conversations
    description: Conversations group your message history with each contact into one thread
  - name: tools
    description: >-
      Tools to assist with sending and receiving messages, such as file sharing,
      translation, etc.
  - name: webhooks
    description: >-
      Webhooks allow your own system to be automatically notified upon certin
      events, such as a new message received from one of your contacts or a
      status change notification for your messages
  - name: workflows
    description: Create, modify, and delete workflows
  - name: workflowtemplates
    description: Existing workflow templates that can be used
  - name: meetingevents
    description: Configure meeting events for your leads to book time with you
  - name: meetings
    description: Meetings with your contacts
externalDocs:
  description: Find out more about Sakari
  url: https://sakari.io
paths:
  /v1/accounts/{accountId}/dripcampaigns/{dripCampaignId}/duplicate:
    post:
      tags:
        - dripcampaigns
      summary: Duplicate a Drip Campaign
      operationId: accounts.dripcampaigns.duplicate
      parameters:
        - $ref: '#/components/parameters/accountIdPath'
        - $ref: '#/components/parameters/dripCampaignIdPath'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DripCampaignResponse'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      security:
        - sakari_auth: []
components:
  parameters:
    accountIdPath:
      name: accountId
      in: path
      description: Account to apply operations to
      required: true
      schema:
        type: string
    dripCampaignIdPath:
      name: dripCampaignId
      in: path
      description: Drip Campaign to apply operations to
      required: true
      schema:
        type: string
  schemas:
    DripCampaignResponse:
      allOf:
        - $ref: '#/components/schemas/BasicResponse'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/DripCampaign'
          required:
            - data
    BasicResponse:
      type: object
      properties:
        success:
          type: boolean
      required:
        - success
    DripCampaign:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        trigger:
          type: object
          properties:
            type:
              type: string
            message:
              type: string
            groups:
              type: array
              items:
                $ref: '#/components/schemas/Group'
            list:
              $ref: '#/components/schemas/List'
            group:
              $ref: '#/components/schemas/Group'
            delay:
              $ref: '#/components/schemas/Delay'
          required:
            - type
            - delay
        messages:
          type: array
          items:
            $ref: '#/components/schemas/DripCampaignMessage'
        active:
          type: boolean
          readOnly: true
        maxDuration:
          type: number
          readOnly: true
        stats:
          $ref: '#/components/schemas/DripCampaignStats'
        created:
          $ref: '#/components/schemas/Updated'
          readOnly: true
        updated:
          $ref: '#/components/schemas/Updated'
          readOnly: true
      required:
        - name
        - group
        - trigger
        - messages
    ErrorResponse:
      allOf:
        - $ref: '#/components/schemas/BasicResponse'
        - type: object
          properties:
            error:
              $ref: '#/components/schemas/Error'
      required:
        - error
    Group:
      allOf:
        - $ref: '#/components/schemas/BasicGroup'
        - type: object
          properties:
            id:
              type: string
            name:
              type: string
            phoneNumbers?:
              type: array
              items:
                $ref: '#/components/schemas/PhoneNumber'
            notifications:
              type: array
              items:
                $ref: '#/components/schemas/GroupNotification'
            tags:
              type: array
              items:
                type: string
            users:
              type: array
              items:
                $ref: '#/components/schemas/User'
            senders:
              type: array
              items:
                $ref: '#/components/schemas/Sender'
            officeHours:
              $ref: '#/components/schemas/GroupOfficeHours'
            isDefault:
              type: boolean
            useSharedPool:
              type: boolean
    List:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        source:
          type: object
          properties:
            id:
              type: string
            integration:
              type: string
            lastSynced:
              type: string
          required:
            - id
            - integration
        keyword:
          type: string
        doubleOptIn:
          type: object
          properties:
            enabled:
              type: boolean
            prompt:
              type: string
        filter:
          $ref: '#/components/schemas/ContactFilter'
        optInConfirmation:
          type: string
      required:
        - id
        - name
    Delay:
      type: object
      properties:
        days:
          type: number
        hours:
          type: number
        minutes:
          type: number
      required:
        - days
        - hours
        - minutes
    DripCampaignMessage:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        message:
          type: string
        media:
          type: array
          items:
            $ref: '#/components/schemas/Media'
        delay:
          $ref: '#/components/schemas/Delay'
        stats:
          $ref: '#/components/schemas/DripCampaignStats'
      required:
        - message
        - delay
    DripCampaignStats:
      type: object
      properties:
        entered:
          type: number
        active:
          type: number
        errored:
          type: number
        noAction:
          type: number
        optOut:
          type: number
        engaged:
          type: number
    Updated:
      type: object
      properties:
        at:
          type: string
          format: date-time
        by:
          $ref: '#/components/schemas/UpdatedBy'
      readOnly: true
      required:
        - at
    Error:
      type: object
      properties:
        code:
          type: string
          example: CONT-010
        description:
          type: string
          example: Contact has requested no further communication
      required:
        - code
        - description
    BasicGroup:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
    PhoneNumber:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        number:
          type: string
        country:
          type: string
        type:
          type: string
        verified:
          type: boolean
        provider:
          type: string
        supportedDestinations:
          type: array
          items:
            type: string
        forwardTo:
          type: object
        universalReply:
          type: boolean
        channels:
          $ref: '#/components/schemas/PhoneNumberChannels'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/BasicGroup'
        hosted:
          type: boolean
      required:
        - id
        - number
        - country
        - type
        - status
    GroupNotification:
      type: object
      properties:
        destination:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
        integration:
          type: string
        group:
          $ref: '#/components/schemas/BasicGroup'
    User:
      allOf:
        - $ref: '#/components/schemas/Person'
        - type: object
          properties:
            role:
              type: string
              enum:
                - Administrator
                - CampaignManager
                - Sender
                - ReadOnly
            tacAccepted:
              type: string
              format: date-time
      required:
        - id
        - email
        - role
    Sender:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - phonenumber
        subType:
          type: string
        status:
          type: string
        identifier:
          type: string
        channels:
          $ref: '#/components/schemas/PhoneNumberChannels'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/BasicGroup'
        created:
          $ref: '#/components/schemas/Updated'
        updated:
          $ref: '#/components/schemas/Updated'
      required:
        - id
        - type
        - subType
        - status
        - identifier
        - created
        - updated
    GroupOfficeHours:
      type: object
      properties:
        active:
          type: boolean
        timezone:
          type: string
        times:
          $ref: '#/components/schemas/Times'
    ContactFilter:
      type: object
      properties:
        q:
          type: string
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Condition'
        list:
          type: string
        valid:
          type: boolean
        invalid:
          type: boolean
        blocked:
          type: boolean
        unblocked:
          type: boolean
        optIn:
          type: boolean
    Media:
      type: object
      properties:
        url:
          type: string
        type:
          type: string
        name:
          type: string
        filename:
          type: string
    UpdatedBy:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          example: Joe Bloggs
        firstName:
          type: string
          example: Joe
        lastName:
          type: string
          example: Bloggs
        email:
          type: string
          example: joe@bloggs.com
        source:
          type: string
        subSource:
          type: string
    PhoneNumberChannels:
      type: object
      properties:
        sms:
          $ref: '#/components/schemas/SmsChannel'
        voice:
          $ref: '#/components/schemas/VoiceChannel'
        whatsapp:
          $ref: '#/components/schemas/WhatsappChannel'
    Person:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        email:
          type: string
          example: chris@sakari.io
        firstName:
          type: string
          example: Chris
        lastName:
          type: string
          example: Bloggs
        mobile:
          $ref: '#/components/schemas/InternationalNumber'
    Times:
      type: object
      properties:
        sun:
          type: array
          items:
            $ref: '#/components/schemas/Hours'
        mon:
          type: array
          items:
            $ref: '#/components/schemas/Hours'
        tue:
          type: array
          items:
            $ref: '#/components/schemas/Hours'
        wed:
          type: array
          items:
            $ref: '#/components/schemas/Hours'
        thu:
          type: array
          items:
            $ref: '#/components/schemas/Hours'
        fri:
          type: array
          items:
            $ref: '#/components/schemas/Hours'
        sat:
          type: array
          items:
            $ref: '#/components/schemas/Hours'
    Condition:
      type: object
      properties:
        attribute:
          type: string
        comparator:
          type: string
        value:
          oneOf:
            - type: array
              items:
                type: string
            - type: array
              items:
                type: number
            - type: string
            - type: number
      required:
        - attribute
        - comparator
        - value
    SmsChannel:
      allOf:
        - $ref: '#/components/schemas/Channel'
        - type: object
          properties:
            universalReply:
              type: boolean
            supportedDestinations:
              $ref: '#/components/schemas/SupportedDestinations'
            regulatory:
              $ref: '#/components/schemas/SmsRegulatory'
    VoiceChannel:
      allOf:
        - $ref: '#/components/schemas/Channel'
        - type: object
          properties:
            incoming:
              type: object
              properties:
                action:
                  type: string
                  enum:
                    - forward
                    - voicemail
                forwardTo:
                  type: string
                message:
                  type: string
                transcribe:
                  type: boolean
            features:
              type: array
              items:
                type: string
    WhatsappChannel:
      allOf:
        - $ref: '#/components/schemas/Channel'
    InternationalNumber:
      type: object
      properties:
        country:
          type: string
        number:
          type: string
          example: 123-456-7890
        verified:
          type: string
          format: date-time
        valid:
          type: boolean
        lineType:
          type: string
          example: mobile
      required:
        - country
        - number
    Hours:
      type: object
      properties:
        start:
          $ref: '#/components/schemas/Time'
        end:
          $ref: '#/components/schemas/Time'
      required:
        - start
        - end
    Channel:
      type: object
      properties:
        active:
          type: boolean
    SupportedDestinations:
      type: object
      additionalProperties:
        type: boolean
    SmsRegulatory:
      type: object
      properties:
        brandStatus:
          type: string
        campaign:
          type: object
          properties:
            id:
              type: string
            campaignId:
              type: string
            useCase:
              type: string
        pft:
          type: boolean
        submitted:
          type: string
          format: date-time
        approved:
          type: string
          format: date-time
        rejected:
          type: string
          format: date-time
    Time:
      type: object
      required:
        - hour
        - minute
      properties:
        hour:
          type: number
        minute:
          type: number
  responses:
    4XX:
      description: invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    5XX:
      description: invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    sakari_auth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /oauth2/token
          scopes:
            messages:send: Send messages

````