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

# Edit Service

> Allows a user to edit the details of an existing service.
This can include changes in payment method, adjusting automatic collection,
and marking for cancellation at the end of a period.




## OpenAPI

````yaml patch /public/user/service/edit/{service_id}
openapi: 3.0.1
info:
  title: Byteful Public User API
  description: Public API used for third-party usage.
  termsOfService: https://byteful.com
  contact:
    url: https://byteful.com
    email: developer@byteful.com
  version: '1.0'
  x-logo:
    altText: Byteful
    backgroundColor: '#6354eb'
    url: >-
      https://pbs.twimg.com/profile_banners/1038803520605118464/1729783007/1500x500
servers:
  - url: https://api.byteful.com/1.0/
security: []
paths:
  /public/user/service/edit/{service_id}:
    patch:
      tags:
        - Service
      summary: Edit Service
      description: >
        Allows a user to edit the details of an existing service.

        This can include changes in payment method, adjusting automatic
        collection,

        and marking for cancellation at the end of a period.
      parameters:
        - name: service_id
          in: path
          description: ID of the Service to edit
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content type for the request body as application/json.
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: Parameters required to edit the service.
        content:
          application/json:
            schema:
              type: object
              properties:
                cancel_comment:
                  type: string
                  description: Comment regarding the cancellation.
                cancel_feedback:
                  type: string
                  description: Feedback reasons for cancellation.
                payment_method_id:
                  type: string
                  description: New payment method ID.
                service_is_automatic_collection:
                  type: boolean
                  description: Flag to determine if service charge should be automatic.
                service_is_pending_cancellation:
                  type: boolean
                  description: >-
                    Indicates if the service should be canceled at the end of
                    the period.
                service_metadata:
                  type: object
                  properties: {}
                  description: |
                    Arbitrary metadata object associated with the service.
                    Constraints
                      - Must be a valid, non-nested JSON object.
                      - Maximum 30 keys.
                      - Each value's string representation ≤ 300 characters.
                      - Total size ≤ 32KB.
        required: true
      responses:
        '200':
          description: Successfully edited the service.
          content:
            application/json:
              schema:
                type: object
                properties:
                  edited:
                    type: array
                    description: List of service IDs that were successfully edited.
                    example:
                      - API-1234-5678
                    items:
                      type: string
                      description: The service ID.
                  message:
                    type: string
                    description: Success message.
                    example: Service successfully edited.
      security:
        - APIPrivateKey: []
          APIPublicKey: []
components:
  securitySchemes:
    APIPrivateKey:
      type: apiKey
      description: ' Private API key for user-level authentication.'
      name: X-API-Private-Key
      in: header
    APIPublicKey:
      type: apiKey
      description: ' Public API key for user-level authentication.'
      name: X-API-Public-Key
      in: header

````